cleanup iocsh
This commit is contained in:
committed by
Michael Davidsaver
parent
ad2bb0725d
commit
3ca42fc838
@@ -659,6 +659,7 @@ int iocShutdown(void)
|
||||
callbackShutdown();
|
||||
iterateRecords(doFreeRecord, NULL);
|
||||
asShutdown();
|
||||
iocshFree();
|
||||
iocState = iocStopped;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -203,20 +203,22 @@ void epicsShareAPI iocshRegisterVariable (const iocshVarDef *piocshVarDef)
|
||||
*/
|
||||
void epicsShareAPI iocshFree(void)
|
||||
{
|
||||
struct iocshCommand *pc, *nc;
|
||||
struct iocshVariable *pv, *nv;
|
||||
struct iocshCommand *pc;
|
||||
struct iocshVariable *pv;
|
||||
|
||||
iocshTableLock ();
|
||||
for (pc = iocshCommandHead ; pc != NULL ; ) {
|
||||
nc = pc->next;
|
||||
struct iocshCommand * nc = pc->next;
|
||||
free (pc);
|
||||
pc = nc;
|
||||
}
|
||||
for (pv = iocshVariableHead ; pv != NULL ; ) {
|
||||
nv = pv->next;
|
||||
struct iocshVariable *nv = pv->next;
|
||||
free (pv);
|
||||
pv = nv;
|
||||
}
|
||||
iocshCommandHead = NULL;
|
||||
iocshVariableHead = NULL;
|
||||
iocshTableUnlock ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user