From 87c4db7e4d881664a385ea2bcf0e496ee21f4b6a Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 17 Mar 2008 22:18:25 +0000 Subject: [PATCH] Moved condWait() into conditional compilation area where it's used. --- src/libCom/osi/os/posix/osdMutex.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/libCom/osi/os/posix/osdMutex.c b/src/libCom/osi/os/posix/osdMutex.c index 286f5f7f1..72af206a8 100644 --- a/src/libCom/osi/os/posix/osdMutex.c +++ b/src/libCom/osi/os/posix/osdMutex.c @@ -47,15 +47,6 @@ static int mutexLock(pthread_mutex_t *id) } } -static int condWait(pthread_cond_t *condId, pthread_mutex_t *mutexId) -{ - int status; - while(1) { - status = pthread_cond_wait(condId,mutexId); - if(status!=EINTR) return status; - errlogPrintf("pthread_cond_wait returned EINTR. Violates SUSv3\n"); - } -} /* Until these can be demonstrated to work leave them undefined*/ /* On solaris 8 _POSIX_THREAD_PRIO_INHERIT fails*/ #undef _POSIX_THREAD_PROCESS_SHARED @@ -220,6 +211,16 @@ void epicsMutexOsdUnlock(struct epicsMutexOSD * pmutex) checkStatusQuit(status,"pthread_mutex_unlock","epicsMutexOsdUnlock"); } +static int condWait(pthread_cond_t *condId, pthread_mutex_t *mutexId) +{ + int status; + while(1) { + status = pthread_cond_wait(condId,mutexId); + if(status!=EINTR) return status; + errlogPrintf("pthread_cond_wait returned EINTR. Violates SUSv3\n"); + } +} + epicsMutexLockStatus epicsMutexOsdLock(struct epicsMutexOSD * pmutex) { pthread_t tid = pthread_self();