changes for osiThread=>epicsThread
This commit is contained in:
+3
-3
@@ -85,12 +85,12 @@ int CASG::block ( double timeout )
|
||||
/*
|
||||
* dont allow recursion
|
||||
*/
|
||||
void *p = threadPrivateGet (cacRecursionLock);
|
||||
void *p = epicsThreadPrivateGet (cacRecursionLock);
|
||||
if ( p ) {
|
||||
return ECA_EVDISALLOW;
|
||||
}
|
||||
|
||||
threadPrivateSet (cacRecursionLock, &cacRecursionLock);
|
||||
epicsThreadPrivateSet (cacRecursionLock, &cacRecursionLock);
|
||||
|
||||
cur_time = osiTime::getCurrent ();
|
||||
|
||||
@@ -140,7 +140,7 @@ int CASG::block ( double timeout )
|
||||
|
||||
this->client.disableCallbackPreemption ();
|
||||
|
||||
threadPrivateSet (cacRecursionLock, NULL);
|
||||
epicsThreadPrivateSet (cacRecursionLock, NULL);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
+19
-19
@@ -27,16 +27,16 @@
|
||||
#include "oldAccess.h"
|
||||
#include "cac_IL.h"
|
||||
|
||||
threadPrivateId caClientContextId;
|
||||
epicsThreadPrivateId caClientContextId;
|
||||
|
||||
threadPrivateId cacRecursionLock;
|
||||
epicsThreadPrivateId cacRecursionLock;
|
||||
|
||||
static threadOnceId caClientContextIdOnce = OSITHREAD_ONCE_INIT;
|
||||
static epicsThreadOnceId caClientContextIdOnce = EPICS_THREAD_ONCE_INIT;
|
||||
|
||||
extern "C" void ca_client_exit_handler ()
|
||||
{
|
||||
if ( caClientContextId ) {
|
||||
threadPrivateDelete ( caClientContextId );
|
||||
epicsThreadPrivateDelete ( caClientContextId );
|
||||
caClientContextId = 0;
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ extern "C" void ca_client_exit_handler ()
|
||||
// runs once only for each process
|
||||
extern "C" void ca_init_client_context ( void * )
|
||||
{
|
||||
caClientContextId = threadPrivateCreate ();
|
||||
caClientContextId = epicsThreadPrivateCreate ();
|
||||
if ( caClientContextId ) {
|
||||
atexit ( ca_client_exit_handler );
|
||||
}
|
||||
@@ -58,20 +58,20 @@ int fetchClientContext ( cac **ppcac )
|
||||
int status;
|
||||
|
||||
if ( caClientContextId == 0 ) {
|
||||
threadOnce ( &caClientContextIdOnce, ca_init_client_context, 0 );
|
||||
epicsThreadOnce ( &caClientContextIdOnce, ca_init_client_context, 0 );
|
||||
if ( caClientContextId == 0 ) {
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
}
|
||||
|
||||
*ppcac = ( cac * ) threadPrivateGet ( caClientContextId );
|
||||
*ppcac = ( cac * ) epicsThreadPrivateGet ( caClientContextId );
|
||||
if ( *ppcac ) {
|
||||
status = ECA_NORMAL;
|
||||
}
|
||||
else {
|
||||
status = ca_task_initialize ();
|
||||
if ( status == ECA_NORMAL ) {
|
||||
*ppcac = (cac *) threadPrivateGet ( caClientContextId );
|
||||
*ppcac = (cac *) epicsThreadPrivateGet ( caClientContextId );
|
||||
if ( ! *ppcac ) {
|
||||
status = ECA_INTERNAL;
|
||||
}
|
||||
@@ -119,13 +119,13 @@ extern "C" epicsShareFunc int epicsShareAPI ca_context_create ( int preemptiveCa
|
||||
{
|
||||
cac *pcac;
|
||||
|
||||
threadOnce ( &caClientContextIdOnce, ca_init_client_context, 0);
|
||||
epicsThreadOnce ( &caClientContextIdOnce, ca_init_client_context, 0);
|
||||
|
||||
if ( caClientContextId == 0 ) {
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
|
||||
pcac = (cac *) threadPrivateGet ( caClientContextId );
|
||||
pcac = (cac *) epicsThreadPrivateGet ( caClientContextId );
|
||||
if ( pcac ) {
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ extern "C" epicsShareFunc int epicsShareAPI ca_context_create ( int preemptiveCa
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
|
||||
threadPrivateSet ( caClientContextId, (void *) pcac );
|
||||
epicsThreadPrivateSet ( caClientContextId, (void *) pcac );
|
||||
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
@@ -185,10 +185,10 @@ extern "C" epicsShareFunc int epicsShareAPI ca_context_destroy ()
|
||||
cac *pcac;
|
||||
|
||||
if ( caClientContextId != NULL ) {
|
||||
pcac = (cac *) threadPrivateGet ( caClientContextId );
|
||||
pcac = (cac *) epicsThreadPrivateGet ( caClientContextId );
|
||||
if ( pcac ) {
|
||||
delete pcac;
|
||||
threadPrivateSet ( caClientContextId, 0 );
|
||||
epicsThreadPrivateSet ( caClientContextId, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ extern "C" void epicsShareAPI ca_signal_formated ( long ca_status, const char *p
|
||||
};
|
||||
|
||||
if ( caClientContextId ) {
|
||||
pcac = (cac *) threadPrivateGet ( caClientContextId );
|
||||
pcac = (cac *) epicsThreadPrivateGet ( caClientContextId );
|
||||
}
|
||||
else {
|
||||
pcac = NULL;
|
||||
@@ -688,7 +688,7 @@ int ca_printf ( const char *pformat, ... )
|
||||
int ca_vPrintf ( const char *pformat, va_list args )
|
||||
{
|
||||
if ( caClientContextId ) {
|
||||
cac *pcac = (cac *) threadPrivateGet ( caClientContextId );
|
||||
cac *pcac = (cac *) epicsThreadPrivateGet ( caClientContextId );
|
||||
if ( pcac ) {
|
||||
return pcac->vPrintf ( pformat, args );
|
||||
}
|
||||
@@ -790,7 +790,7 @@ extern "C" unsigned epicsShareAPI ca_get_ioc_connection_count ()
|
||||
return pcac->connectionCount ();
|
||||
}
|
||||
|
||||
extern "C" epicsShareFunc int epicsShareAPI ca_channel_status ( threadId /* tid */ )
|
||||
extern "C" epicsShareFunc int epicsShareAPI ca_channel_status ( epicsThreadId /* tid */ )
|
||||
{
|
||||
printf ("new OSI API does not allow peeking at thread private storage of another thread\n");
|
||||
printf ("please call \"ca_client_status ( unsigned level )\" from the subsystem specific diagnostic code.\n");
|
||||
@@ -820,7 +820,7 @@ extern "C" epicsShareFunc int epicsShareAPI ca_client_status ( unsigned level )
|
||||
extern "C" epicsShareFunc int epicsShareAPI ca_current_context (caClientCtx *pCurrentContext)
|
||||
{
|
||||
if ( caClientContextId ) {
|
||||
void *pCtx = threadPrivateGet ( caClientContextId );
|
||||
void *pCtx = epicsThreadPrivateGet ( caClientContextId );
|
||||
if (pCtx) {
|
||||
*pCurrentContext = pCtx;
|
||||
return ECA_NORMAL;
|
||||
@@ -844,11 +844,11 @@ extern "C" epicsShareFunc int epicsShareAPI ca_attach_context (caClientCtx conte
|
||||
{
|
||||
cac *pcac;
|
||||
|
||||
pcac = (cac *) threadPrivateGet ( caClientContextId );
|
||||
pcac = (cac *) epicsThreadPrivateGet ( caClientContextId );
|
||||
if ( pcac && context != 0 ) {
|
||||
return ECA_ISATTACHED;
|
||||
}
|
||||
threadPrivateSet ( caClientContextId, context );
|
||||
epicsThreadPrivateSet ( caClientContextId, context );
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -24,14 +24,14 @@
|
||||
extern "C" void cacRecursionLockExitHandler ()
|
||||
{
|
||||
if ( cacRecursionLock ) {
|
||||
threadPrivateDelete ( cacRecursionLock );
|
||||
epicsThreadPrivateDelete ( cacRecursionLock );
|
||||
cacRecursionLock = 0;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" void cacInitRecursionLock ( void * )
|
||||
{
|
||||
cacRecursionLock = threadPrivateCreate ();
|
||||
cacRecursionLock = epicsThreadPrivateCreate ();
|
||||
if ( cacRecursionLock ) {
|
||||
atexit ( cacRecursionLockExitHandler );
|
||||
}
|
||||
@@ -50,14 +50,14 @@ cac::cac ( bool enablePreemptiveCallbackIn ) :
|
||||
pudpiiu ( 0 ),
|
||||
pSearchTmr ( 0 ),
|
||||
pRepeaterSubscribeTmr ( 0 ),
|
||||
initializingThreadsPriority ( threadGetPrioritySelf () ),
|
||||
initializingThreadsPriority ( epicsThreadGetPrioritySelf () ),
|
||||
enablePreemptiveCallback ( enablePreemptiveCallbackIn )
|
||||
{
|
||||
long status;
|
||||
static threadOnceId once = OSITHREAD_ONCE_INIT;
|
||||
static epicsThreadOnceId once = EPICS_THREAD_ONCE_INIT;
|
||||
unsigned abovePriority;
|
||||
|
||||
threadOnce ( &once, cacInitRecursionLock, 0 );
|
||||
epicsThreadOnce ( &once, cacInitRecursionLock, 0 );
|
||||
|
||||
if ( cacRecursionLock == 0 ) {
|
||||
throwWithLocation ( caErrorCode (ECA_ALLOCMEM) );
|
||||
@@ -68,10 +68,10 @@ cac::cac ( bool enablePreemptiveCallbackIn ) :
|
||||
}
|
||||
|
||||
{
|
||||
threadBoolStatus tbs;
|
||||
epicsThreadBooleanStatus tbs;
|
||||
|
||||
tbs = threadLowestPriorityLevelAbove ( this->initializingThreadsPriority, &abovePriority);
|
||||
if ( tbs != tbsSuccess ) {
|
||||
tbs = epicsThreadLowestPriorityLevelAbove ( this->initializingThreadsPriority, &abovePriority);
|
||||
if ( tbs != epicsThreadBooleanStatusSuccess ) {
|
||||
abovePriority = this->initializingThreadsPriority;
|
||||
}
|
||||
}
|
||||
@@ -518,12 +518,12 @@ int cac::pend ( double timeout, int early )
|
||||
/*
|
||||
* dont allow recursion
|
||||
*/
|
||||
p = threadPrivateGet ( cacRecursionLock );
|
||||
p = epicsThreadPrivateGet ( cacRecursionLock );
|
||||
if (p) {
|
||||
return ECA_EVDISALLOW;
|
||||
}
|
||||
|
||||
threadPrivateSet ( cacRecursionLock, &cacRecursionLock );
|
||||
epicsThreadPrivateSet ( cacRecursionLock, &cacRecursionLock );
|
||||
|
||||
this->enableCallbackPreemption ();
|
||||
|
||||
@@ -531,7 +531,7 @@ int cac::pend ( double timeout, int early )
|
||||
|
||||
this->disableCallbackPreemption ();
|
||||
|
||||
threadPrivateSet ( cacRecursionLock, NULL );
|
||||
epicsThreadPrivateSet ( cacRecursionLock, NULL );
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -1039,7 +1039,7 @@ void cac::destroyNCIU ( nciu & chan )
|
||||
bool cac::flushPermit () const
|
||||
{
|
||||
if ( this->pRecvProcThread ) {
|
||||
if ( this->pRecvProcThread->isCurrentThread () ) {
|
||||
if ( this->pRecvProcThread->thread.isCurrentThread () ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -37,7 +37,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "osiThread.h"
|
||||
#include "epicsThread.h"
|
||||
#include "shareLib.h"
|
||||
#include "caerr.h"
|
||||
#include "db_access.h"
|
||||
@@ -941,14 +941,14 @@ typedef void * caClientCtx;
|
||||
epicsShareFunc int epicsShareAPI ca_current_context (caClientCtx *pCurrentContext);
|
||||
epicsShareFunc int epicsShareAPI ca_attach_context (caClientCtx context);
|
||||
|
||||
epicsShareFunc int epicsShareAPI ca_channel_status (threadId tid);
|
||||
epicsShareFunc int epicsShareAPI ca_channel_status (epicsThreadId tid);
|
||||
epicsShareFunc int epicsShareAPI ca_client_status (unsigned level);
|
||||
|
||||
/*
|
||||
* deprecated
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_import (threadId tid);
|
||||
epicsShareFunc int epicsShareAPI ca_import_cancel (threadId tid);
|
||||
epicsShareFunc int epicsShareAPI ca_import (epicsThreadId tid);
|
||||
epicsShareFunc int epicsShareAPI ca_import_cancel (epicsThreadId tid);
|
||||
|
||||
|
||||
#else /* CAC_ANSI_FUNC_PROTO */
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ int main ( int argc, char **argv )
|
||||
unsigned attemptNumber = 0u;
|
||||
while ( true ) {
|
||||
caRepeaterRegistrationMessage ( sock, repeaterPort, attemptNumber );
|
||||
threadSleep ( 0.1 );
|
||||
epicsThreadSleep ( 0.1 );
|
||||
addrSize = ( osiSocklen_t ) sizeof ( addr );
|
||||
status = recvfrom ( sock, buf, sizeof ( buf ), 0,
|
||||
&addr.sa, &addrSize );
|
||||
|
||||
+9
-7
@@ -45,7 +45,7 @@
|
||||
#include "tsDLList.h"
|
||||
#include "osiSock.h"
|
||||
#include "epicsEvent.h"
|
||||
#include "osiThread.h"
|
||||
#include "epicsThread.h"
|
||||
#include "osiTimer.h"
|
||||
#include "epicsMutex.h"
|
||||
#include "epicsEvent.h"
|
||||
@@ -486,7 +486,7 @@ static const unsigned contiguousMsgCountWhichTriggersFlowControl = 10u;
|
||||
|
||||
enum iiu_conn_state {iiu_connecting, iiu_connected, iiu_disconnected};
|
||||
|
||||
extern threadPrivateId cacRecursionLock;
|
||||
extern epicsThreadPrivateId cacRecursionLock;
|
||||
|
||||
class netiiu {
|
||||
public:
|
||||
@@ -610,7 +610,7 @@ private:
|
||||
char xmitBuf [MAX_UDP_SEND];
|
||||
char recvBuf [MAX_UDP_RECV];
|
||||
ELLLIST dest;
|
||||
threadId recvThreadId;
|
||||
epicsThreadId recvThreadId;
|
||||
epicsEventId recvThreadExitSignal;
|
||||
unsigned nBytesInXmitBuf;
|
||||
SOCKET sock;
|
||||
@@ -900,16 +900,17 @@ private:
|
||||
int code;
|
||||
};
|
||||
|
||||
class recvProcessThread : public osiThread {
|
||||
class recvProcessThread : public epicsThreadRunable {
|
||||
public:
|
||||
recvProcessThread ( class cac *pcacIn );
|
||||
~recvProcessThread ();
|
||||
void entryPoint ();
|
||||
void run ();
|
||||
void signalShutDown ();
|
||||
void enable ();
|
||||
void disable ();
|
||||
void signalActivity ();
|
||||
void show ( unsigned level ) const;
|
||||
epicsThread thread;
|
||||
private:
|
||||
//
|
||||
// The additional complexity associated with
|
||||
@@ -929,13 +930,14 @@ private:
|
||||
bool shutDown;
|
||||
};
|
||||
|
||||
class sendProcessThread : public osiThread {
|
||||
class sendProcessThread : public epicsThreadRunable {
|
||||
public:
|
||||
sendProcessThread ( class cac &cacIn );
|
||||
~sendProcessThread ();
|
||||
void entryPoint ();
|
||||
void run ();
|
||||
void signalShutDown ();
|
||||
void signalActivity ();
|
||||
epicsThread thread;
|
||||
private:
|
||||
epicsEvent sendActivity;
|
||||
class cac &cacRef;
|
||||
|
||||
@@ -20,24 +20,26 @@
|
||||
#include "cac_IL.h"
|
||||
|
||||
recvProcessThread::recvProcessThread (cac *pcacIn) :
|
||||
osiThread ( "CAC-recv-process", threadGetStackSize (threadStackSmall),
|
||||
pcacIn->getInitializingThreadsPriority () ),
|
||||
thread(*this, "CAC-recv-process",
|
||||
epicsThreadGetStackSize(epicsThreadStackSmall),
|
||||
pcacIn->getInitializingThreadsPriority() ),
|
||||
pcac ( pcacIn ),
|
||||
enableRefCount ( 0u ),
|
||||
blockingForCompletion ( 0u ),
|
||||
processing ( false ),
|
||||
shutDown ( false )
|
||||
{
|
||||
this->start ();
|
||||
this->thread.start ();
|
||||
}
|
||||
|
||||
recvProcessThread::~recvProcessThread ()
|
||||
{
|
||||
this->signalShutDown ();
|
||||
this->exit.wait ();
|
||||
delete &thread;
|
||||
}
|
||||
|
||||
void recvProcessThread::entryPoint ()
|
||||
void recvProcessThread::run ()
|
||||
{
|
||||
int status = ca_attach_context ( this->pcac );
|
||||
SEVCHK ( status, "attaching to client context in recv process thread" );
|
||||
|
||||
+1
-1
@@ -562,7 +562,7 @@ void epicsShareAPI ca_repeater ()
|
||||
*/
|
||||
void caRepeaterThread ( void * /* pDummy */ )
|
||||
{
|
||||
taskwdInsert ( threadGetIdSelf(), NULL, NULL );
|
||||
taskwdInsert ( epicsThreadGetIdSelf(), NULL, NULL );
|
||||
ca_repeater ();
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -303,15 +303,15 @@ extern "C" void cacRecvThreadTCP ( void *pParam )
|
||||
epicsAutoMutex autoMutex ( piiu->mutex );
|
||||
if ( piiu->state == iiu_connected ) {
|
||||
unsigned priorityOfSend;
|
||||
threadBoolStatus tbs;
|
||||
threadId tid;
|
||||
epicsThreadBooleanStatus tbs;
|
||||
epicsThreadId tid;
|
||||
|
||||
tbs = threadLowestPriorityLevelAbove ( piiu->pCAC ()->getInitializingThreadsPriority (), &priorityOfSend );
|
||||
if ( tbs != tbsSuccess ) {
|
||||
tbs = epicsThreadLowestPriorityLevelAbove ( piiu->pCAC ()->getInitializingThreadsPriority (), &priorityOfSend );
|
||||
if ( tbs != epicsThreadBooleanStatusSuccess ) {
|
||||
priorityOfSend = piiu->pCAC ()->getInitializingThreadsPriority ();
|
||||
}
|
||||
tid = threadCreate ( "CAC-TCP-send", priorityOfSend,
|
||||
threadGetStackSize ( threadStackMedium ), cacSendThreadTCP, piiu );
|
||||
tid = epicsThreadCreate ( "CAC-TCP-send", priorityOfSend,
|
||||
epicsThreadGetStackSize ( epicsThreadStackMedium ), cacSendThreadTCP, piiu );
|
||||
if ( ! tid ) {
|
||||
epicsEventSignal ( piiu->recvThreadExitSignal );
|
||||
epicsEventSignal ( piiu->sendThreadExitSignal );
|
||||
@@ -353,7 +353,7 @@ extern "C" void cacRecvThreadTCP ( void *pParam )
|
||||
}
|
||||
else {
|
||||
// no way to be informed when memory is available
|
||||
threadSleep ( 0.5 );
|
||||
epicsThreadSleep ( 0.5 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -429,8 +429,8 @@ bool tcpiiu::initiateConnect ( const osiSockAddr &addrIn, unsigned minorVersion,
|
||||
class bhe &bhe, ipAddrToAsciiEngine &engineIn )
|
||||
{
|
||||
unsigned priorityOfRecv;
|
||||
threadBoolStatus tbs;
|
||||
threadId tid;
|
||||
epicsThreadBooleanStatus tbs;
|
||||
epicsThreadId tid;
|
||||
int status;
|
||||
int flag;
|
||||
|
||||
@@ -511,13 +511,13 @@ bool tcpiiu::initiateConnect ( const osiSockAddr &addrIn, unsigned minorVersion,
|
||||
|
||||
memset ( (void *) &this->curMsg, '\0', sizeof ( this->curMsg ) );
|
||||
|
||||
tbs = threadHighestPriorityLevelBelow ( this->pCAC ()->getInitializingThreadsPriority (), &priorityOfRecv );
|
||||
if ( tbs != tbsSuccess ) {
|
||||
tbs = epicsThreadHighestPriorityLevelBelow ( this->pCAC ()->getInitializingThreadsPriority (), &priorityOfRecv );
|
||||
if ( tbs != epicsThreadBooleanStatusSuccess ) {
|
||||
priorityOfRecv = this->pCAC ()->getInitializingThreadsPriority ();
|
||||
}
|
||||
|
||||
tid = threadCreate ("CAC-TCP-recv", priorityOfRecv,
|
||||
threadGetStackSize (threadStackMedium), cacRecvThreadTCP, this);
|
||||
tid = epicsThreadCreate ("CAC-TCP-recv", priorityOfRecv,
|
||||
epicsThreadGetStackSize (epicsThreadStackMedium), cacRecvThreadTCP, this);
|
||||
if ( tid == 0 ) {
|
||||
ca_printf ("CA: unable to create CA client receive thread\n");
|
||||
socket_close ( this->sock );
|
||||
|
||||
+9
-9
@@ -314,10 +314,10 @@ epicsShareFunc void epicsShareAPI caStartRepeaterIfNotInstalled ( unsigned repea
|
||||
*/
|
||||
osptr = osiSpawnDetachedProcess ( "CA Repeater", "caRepeater" );
|
||||
if ( osptr == osiSpawnDetachedProcessNoSupport ) {
|
||||
threadId tid;
|
||||
epicsThreadId tid;
|
||||
|
||||
tid = threadCreate ( "CAC-repeater", threadPriorityLow,
|
||||
threadGetStackSize (threadStackMedium), caRepeaterThread, 0);
|
||||
tid = epicsThreadCreate ( "CAC-repeater", epicsThreadPriorityLow,
|
||||
epicsThreadGetStackSize (epicsThreadStackMedium), caRepeaterThread, 0);
|
||||
if ( tid == 0 ) {
|
||||
ca_printf ("caStartRepeaterIfNotInstalled : unable to create CA repeater daemon thread\n");
|
||||
}
|
||||
@@ -413,16 +413,16 @@ udpiiu::udpiiu ( cac &cac ) :
|
||||
|
||||
{
|
||||
unsigned priorityOfRecv;
|
||||
threadBoolStatus tbs;
|
||||
epicsThreadBooleanStatus tbs;
|
||||
|
||||
tbs = threadLowestPriorityLevelAbove (
|
||||
tbs = epicsThreadLowestPriorityLevelAbove (
|
||||
this->pCAC ()->getInitializingThreadsPriority (), &priorityOfRecv );
|
||||
if ( tbs != tbsSuccess ) {
|
||||
if ( tbs != epicsThreadBooleanStatusSuccess ) {
|
||||
priorityOfRecv = this->pCAC ()->getInitializingThreadsPriority ();
|
||||
}
|
||||
|
||||
this->recvThreadId = threadCreate ( "CAC-UDP", priorityOfRecv,
|
||||
threadGetStackSize (threadStackMedium), cacRecvThreadUDP, this );
|
||||
this->recvThreadId = epicsThreadCreate ( "CAC-UDP", priorityOfRecv,
|
||||
epicsThreadGetStackSize (epicsThreadStackMedium), cacRecvThreadUDP, this );
|
||||
if ( this->recvThreadId == 0 ) {
|
||||
ca_printf ("CA: unable to create UDP receive thread\n");
|
||||
epicsEventDestroy (this->recvThreadExitSignal);
|
||||
@@ -852,5 +852,5 @@ void udpiiu::show ( unsigned level ) const
|
||||
|
||||
bool udpiiu::isCurrentThread () const
|
||||
{
|
||||
return ( this->recvThreadId == threadGetIdSelf () );
|
||||
return ( this->recvThreadId == epicsThreadGetIdSelf () );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user