dbNotify: shutdown with exitDatabase
Can't cleanup dbNotify while rsrv or scan tasks are running as there may be operations in progress.
This commit is contained in:
@@ -299,7 +299,7 @@ static void notifyCallback(CALLBACK *pcallback)
|
||||
callDone(precord, ppn);
|
||||
}
|
||||
|
||||
static void dbProcessNotifyExit(void* junk)
|
||||
void dbProcessNotifyExit(void)
|
||||
{
|
||||
assert(ellCount(&pnotifyGlobal->freeList)==0);
|
||||
epicsMutexDestroy(pnotifyGlobal->lock);
|
||||
@@ -314,7 +314,6 @@ void dbProcessNotifyInit(void)
|
||||
pnotifyGlobal = dbCalloc(1,sizeof(notifyGlobal));
|
||||
pnotifyGlobal->lock = epicsMutexMustCreate();
|
||||
ellInit(&pnotifyGlobal->freeList);
|
||||
epicsAtExit(dbProcessNotifyExit, NULL);
|
||||
}
|
||||
|
||||
void dbProcessNotify(processNotify *ppn)
|
||||
|
||||
@@ -76,6 +76,7 @@ epicsShareFunc void dbNotifyCancel(processNotify *pprocessNotify);
|
||||
|
||||
/* dbProcessNotifyInit called by iocInit */
|
||||
epicsShareFunc void dbProcessNotifyInit(void);
|
||||
epicsShareFunc void dbProcessNotifyExit(void);
|
||||
|
||||
/*dbNotifyAdd called by dbScanPassive and dbScanLink*/
|
||||
epicsShareFunc void dbNotifyAdd(
|
||||
|
||||
@@ -684,6 +684,7 @@ int iocShutdown(void)
|
||||
dbLockCleanupRecords(pdbbase);
|
||||
asShutdown();
|
||||
dbChannelExit();
|
||||
dbProcessNotifyExit();
|
||||
iocshFree();
|
||||
}
|
||||
iocState = iocStopped;
|
||||
|
||||
Reference in New Issue
Block a user