dont hold lock while calling callbacks
This commit is contained in:
+12
-28
@@ -21,58 +21,42 @@
|
||||
tsFreeList < class getCallback, 1024 > getCallback::freeList;
|
||||
epicsMutex getCallback::freeListMutex;
|
||||
|
||||
getCallback::getCallback ( oldChannelNotify &chanIn,
|
||||
caEventCallBackFunc *pFuncIn, void *pPrivateIn ) :
|
||||
chan ( chanIn ), pFunc ( pFuncIn ), pPrivate ( pPrivateIn )
|
||||
{
|
||||
}
|
||||
|
||||
getCallback::~getCallback ()
|
||||
{
|
||||
}
|
||||
|
||||
void getCallback::release ()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
// eliminates SUN PRO warning
|
||||
void getCallback::completionNotify ( cacChannelIO &io )
|
||||
{
|
||||
this->cacNotify::completionNotify ( io );
|
||||
}
|
||||
|
||||
void getCallback::completionNotify ( cacChannelIO &io,
|
||||
void getCallback::completion (
|
||||
unsigned type, unsigned long count, const void *pData )
|
||||
{
|
||||
struct event_handler_args args;
|
||||
args.usr = this->pPrivate;
|
||||
args.chid = & io;
|
||||
args.chid = &this->chan;
|
||||
args.type = type;
|
||||
args.count = count;
|
||||
args.status = ECA_NORMAL;
|
||||
args.dbr = pData;
|
||||
( *this->pFunc ) ( args );
|
||||
delete this;
|
||||
}
|
||||
|
||||
void getCallback::exceptionNotify ( cacChannelIO &io, int status,
|
||||
const char * /* pContext */)
|
||||
{
|
||||
struct event_handler_args args;
|
||||
args.usr = this->pPrivate;
|
||||
args.chid = & io;
|
||||
args.type = TYPENOTCONN;
|
||||
args.count = 0;
|
||||
args.status = status;
|
||||
args.dbr = 0;
|
||||
( *this->pFunc ) ( args );
|
||||
}
|
||||
|
||||
void getCallback::exceptionNotify ( cacChannelIO &io,
|
||||
void getCallback::exception (
|
||||
int status, const char * /* pContext */,
|
||||
unsigned type, unsigned long count )
|
||||
{
|
||||
struct event_handler_args args;
|
||||
args.usr = this->pPrivate;
|
||||
args.chid = & io;
|
||||
args.chid = &this->chan;
|
||||
args.type = type;
|
||||
args.count = count;
|
||||
args.status = status;
|
||||
args.dbr = 0;
|
||||
( *this->pFunc ) ( args );
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user