TutMutexDestroy


Name

TutMutexDestroy — destroy a mutex object

Synopsis

T_BOOL TutMutexDestroy(mutex) 
T_MUTEX mutex; 

Arguments

mutex — mutex object to destroy

Return Values

TRUE if mutex object was successfully destroyed, FALSE otherwise.

Diagnostics

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

Description

TutMutexDestroy destroys a mutex object. All operating system resources associated with the mutex are released.

Caution

Destroying a mutex that other threads in the same process have locked or are waiting to lock has undefined results.

See Also

TutMutexCreate

Examples

This example creates and then destroys a mutex object:

T_MUTEX mutex; 
mutex = TutMutexCreate(FALSE); 
if (T_INVALID_MUTEX == mutex) { 
  /* error */ 
} 
... 
if (!TutMutexDestroy(mutex)) { 
  /* error */ 
} 

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