diff --git a/modules/libcom/src/osi/os/vxWorks/osdThread.h b/modules/libcom/src/osi/os/vxWorks/osdThread.h index 259d358e5..25cce37ac 100644 --- a/modules/libcom/src/osi/os/vxWorks/osdThread.h +++ b/modules/libcom/src/osi/os/vxWorks/osdThread.h @@ -1,5 +1,5 @@ /*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne +* Copyright (c) 2021 The University of Chicago, as Operator of Argonne * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. @@ -8,13 +8,22 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -#ifndef osdThreadh -#define osdThreadh +#ifndef INC_osdThread_H +#define INC_osdThread_H -/* VxWorks 6.9 and later can support joining threads */ +#include -#if (_WRS_VXWORKS_MAJOR == 6 && _WRS_VXWORKS_MINOR < 9) -#undef EPICS_THREAD_CAN_JOIN +#ifdef _WRS_VXWORKS_MAJOR +# define VXWORKS_VERSION_INT VERSION_INT(_WRS_VXWORKS_MAJOR, \ + _WRS_VXWORKS_MINOR, _WRS_VXWORKS_MAINT, _WRS_VXWORKS_SVCPK) +#else +/* Version not available at compile-time, assume... */ +# define VXWORKS_VERSION_INT VERSION_INT(5, 5, 0, 0) #endif -#endif /* osdThreadh */ +#if VXWORKS_VERSION_INT < VERSION_INT(6, 9, 4, 1) +/* VxWorks 6.9.4.1 and later can support joining threads */ +# undef EPICS_THREAD_CAN_JOIN +#endif + +#endif /* INC_osdThread_H */