Merge commit '504191441d8fe' into 7.0.5-troubleshoot
Conflicts: modules/database/test/std/link/Makefile modules/libcom/src/osi/os/vxWorks/osdThread.h
This commit is contained in:
@@ -51,7 +51,7 @@ LIBCOM_API epicsEventId epicsEventCreate(epicsEventInitialState init)
|
||||
epicsEventId pevent = malloc(sizeof(*pevent));
|
||||
|
||||
if (pevent) {
|
||||
int status = osdPosixMutexInit(&pevent->mutex, 0);
|
||||
int status = osdPosixMutexInit(&pevent->mutex, PTHREAD_MUTEX_DEFAULT);
|
||||
|
||||
pevent->isFull = (init == epicsEventFull);
|
||||
if (status) {
|
||||
|
||||
@@ -194,6 +194,7 @@ void epicsMutexOsdShow(struct epicsMutexOSD * pmutex, unsigned int level)
|
||||
|
||||
void epicsMutexOsdShowAll(void)
|
||||
{
|
||||
#if defined _POSIX_THREAD_PRIO_INHERIT
|
||||
int proto = -1;
|
||||
int ret = pthread_mutexattr_getprotocol(&globalAttrRecursive, &proto);
|
||||
if(ret) {
|
||||
@@ -201,4 +202,7 @@ void epicsMutexOsdShowAll(void)
|
||||
} else {
|
||||
printf("PI is%s enabled\n", proto==PTHREAD_PRIO_INHERIT ? "" : " not");
|
||||
}
|
||||
#else
|
||||
printf("PI not supported\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* Returns ENOTSUP if requested mutextype is not supported */
|
||||
/* At the moment, only 0 (default non recursive mutex) and PTHREAD_MUTEX_RECURSIVE are supported */
|
||||
/* At the moment, only PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_RECURSIVE are supported */
|
||||
int osdPosixMutexInit(pthread_mutex_t *,int mutextype);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -123,7 +123,7 @@ epicsSpinId epicsSpinCreate(void) {
|
||||
if (!spin)
|
||||
goto fail;
|
||||
|
||||
status = osdPosixMutexInit(&spin->lock, 0);
|
||||
status = osdPosixMutexInit(&spin->lock, PTHREAD_MUTEX_DEFAULT);
|
||||
checkStatus(status, "osdPosixMutexInit");
|
||||
if (status)
|
||||
goto fail;
|
||||
|
||||
@@ -328,9 +328,9 @@ static void once(void)
|
||||
int status;
|
||||
|
||||
pthread_key_create(&getpthreadInfo,0);
|
||||
status = osdPosixMutexInit(&onceLock,0);
|
||||
status = osdPosixMutexInit(&onceLock,PTHREAD_MUTEX_DEFAULT);
|
||||
checkStatusOnceQuit(status,"osdPosixMutexInit","epicsThreadInit");
|
||||
status = osdPosixMutexInit(&listLock,0);
|
||||
status = osdPosixMutexInit(&listLock,PTHREAD_MUTEX_DEFAULT);
|
||||
checkStatusOnceQuit(status,"osdPosixMutexInit","epicsThreadInit");
|
||||
pcommonAttr = calloc(1,sizeof(commonAttr));
|
||||
if(!pcommonAttr) checkStatusOnceQuit(errno,"calloc","epicsThreadInit");
|
||||
|
||||
@@ -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 <epicsVersion.h>
|
||||
|
||||
#if (!defined(_WRS_VXWORKS_MAJOR) || _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 */
|
||||
|
||||
Reference in New Issue
Block a user