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:
Michael Davidsaver
2014-11-18 11:25:15 -05:00
parent 9c2a62ea96
commit 93149071b7
3 changed files with 3 additions and 2 deletions

View File

@@ -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)

View File

@@ -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(

View File

@@ -684,6 +684,7 @@ int iocShutdown(void)
dbLockCleanupRecords(pdbbase);
asShutdown();
dbChannelExit();
dbProcessNotifyExit();
iocshFree();
}
iocState = iocStopped;