allow any CA system thread to attach to a ca context
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "oldAccess.h"
|
||||
|
||||
extern epicsThreadPrivateId caClientContextId;
|
||||
|
||||
oldCAC::oldCAC ( bool enablePreemptiveCallback ) :
|
||||
clientCtx ( * new cac ( *this, enablePreemptiveCallback ) ),
|
||||
ca_exception_func ( 0 ), ca_exception_arg ( 0 ),
|
||||
@@ -199,8 +201,8 @@ void oldCAC::show ( unsigned level ) const
|
||||
|
||||
void oldCAC::attachToClientCtx ()
|
||||
{
|
||||
int status = ca_attach_context ( reinterpret_cast<struct ca_client_context *>(this) );
|
||||
SEVCHK ( status, "error in virtual attach to client context" );
|
||||
assert ( ! epicsThreadPrivateGet ( caClientContextId ) );
|
||||
epicsThreadPrivateSet ( caClientContextId, this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user