TutRwMutexReadLocked check if a R/W mutex is read-locked by the current thread
rw_mutex
R/W mutex object to query
TRUE
if calling thread has been granted a read-lock, FALSE
otherwise.
If TutRwMutexReadLocked fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TutRwMutexReadLocked checks if a R/W mutex is read-locked by the current thread.
None
TutRwMutexCreate, TutRwMutexWriteLocked
This example prints the calling thread’s current lock status:
void show_rw_lock(rw_mutex) T_RW_MUTEX rw_mutex; { if (TutRwMutexWriteLocked(rw_mutex)) { TutOut("WRITE-LOCK"); } else if (TutRwMutexReadLocked(rw_mutex)) { TutOut("READ-LOCK"); } else { TutOut("NONE"); } }
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |