Initial implementation for VxWorks 6.9 and later

This almost seems too simple...
This commit is contained in:
Andrew Johnson
2019-06-17 14:33:28 -05:00
parent f9092783f8
commit e8db975e7f
2 changed files with 16 additions and 3 deletions

View File

@@ -223,7 +223,14 @@ epicsThreadCreateOpt (
return((epicsThreadId)tid);
}
void epicsThreadJoin(epicsThreadId id) {}
void epicsThreadJoin(epicsThreadId id) {
#if EPICS_THREAD_CAN_JOIN
int tid = (int)id;
if (tid)
taskWait(tid, WAIT_FOREVER);
#endif
}
void epicsThreadSuspendSelf()
{

View File

@@ -10,7 +10,13 @@
#ifndef osdThreadh
#define osdThreadh
/* This target does not support joining threads */
#define EPICS_THREAD_CAN_JOIN (0)
/* VxWorks 6.9 and later can support joining threads */
#if (_WRS_VXWORKS_MAJOR > 6) || \
(_WRS_VXWORKS_MAJOR == 6 && _WRS_VXWORKS_MINOR >= 9)
# define EPICS_THREAD_CAN_JOIN (1)
#else
# define EPICS_THREAD_CAN_JOIN (0)
#endif
#endif /* osdThreadh */