TutRwMutexUnlock


Name

TutRwMutexUnlock — release a lock on a R/W mutex

Synopsis

T_BOOL TutRwMutexUnlock(rw_mutex) 
T_RW_MUTEX rw_mutex; 

Arguments

rw_mutex — R/W mutex object to unlock

Return Values

TRUE if the operation was successful, FALSE otherwise.

Diagnostics

If TutRwMutexUnlock fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TutRwMutexUnlock releases a lock on a R/W mutex. Only a thread that owns a lock on rw_mutex can successfully unlock it.

Caution

Every call to TutRwMutexUnlock must balance a previous call to either TutRwMutexReadLock or TutRwMutexWriteLock.

See Also

TutRwMutexCreate, TutRwMutexReadLock, TutRwMutexWriteLock

Examples

This example unlocks a R/W mutex:

T_RW_MUTEX rw_mutex; 
. 
. 
. 
if (!TutRwMutexUnlock(rw_mutex)) { 
  /* error */ 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com