dbDbLink: debug detect dbPutLink w/o locking
Cross-check ownership when lockset debug tracking is enabled.
This commit is contained in:
@@ -443,6 +443,17 @@ static long processTarget(dbCommon *psrc, dbCommon *pdst)
|
||||
epicsUInt8 pact = psrc->pact;
|
||||
epicsThreadId self = epicsThreadGetIdSelf();
|
||||
|
||||
#ifdef LOCKSET_DEBUG
|
||||
{
|
||||
lockSet *ls = dbLockGetRef(psrc->lset);
|
||||
assert(ls->owner == self);
|
||||
dbLockDecRef(ls);
|
||||
ls = dbLockGetRef(pdst->lset);
|
||||
assert(ls->owner == self);
|
||||
dbLockDecRef(ls);
|
||||
}
|
||||
#endif
|
||||
|
||||
psrc->pact = TRUE;
|
||||
|
||||
if (psrc->ppn)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "dbLock.h"
|
||||
#include "epicsMutex.h"
|
||||
#include "epicsSpin.h"
|
||||
#include "epicsThread.h"
|
||||
|
||||
/* Define to enable additional error checking */
|
||||
#undef LOCKSET_DEBUG
|
||||
|
||||
Reference in New Issue
Block a user