fix race condition in dbPutNotify

This commit is contained in:
Marty Kraimer
2004-11-29 21:14:07 +00:00
parent 2151e6b6ad
commit 365f1dc84e
3 changed files with 54 additions and 26 deletions

View File

@@ -49,13 +49,14 @@ dbPutNotifyBlocker::dbPutNotifyBlocker ( epicsMutex & mutexIn ) :
mutex ( mutexIn ), pNotify ( 0 ),
maxValueSize ( sizeof ( this->dbrScalarValue ) )
{
memset ( & this->pn, '\0', sizeof ( this->pn ) );
::putNotifyInit(& this->pn);
memset ( & this->dbrScalarValue, '\0', sizeof ( this->dbrScalarValue ) );
this->pn.pbuffer = & this->dbrScalarValue;
}
dbPutNotifyBlocker::~dbPutNotifyBlocker ()
{
::putNotifyCleanup(& this->pn);
}
void dbPutNotifyBlocker::destructor ( epicsGuard < epicsMutex > & guard )