40 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
44 unsigned countDown = 1000u;
47 status = pthread_mutex_lock ( & mutex );
48 if ( status == 0 )
return;
49 assert ( status == EINTR );
50 struct timespec retryDelay = { 0, 100000000 };
52 while (nanosleep(&retryDelay, &remainingDelay) == -1 && errno == EINTR)
53 retryDelay = remainingDelay;
61 const int status = pthread_mutex_unlock ( & mutex );
#define assert(exp)
Declare that a condition should be true.
An EPICS-specific replacement for ANSI C's assert.
void epicsAtomicMemoryBarrierFallback(void)
void epicsAtomicLock(EpicsAtomicLockKey *)
Defined by POSIX Real Time.
void epicsAtomicUnlock(EpicsAtomicLockKey *)