Revive a mutex that's in the DEAD state
#include <sys/neutrino.h> int SyncMutexRevive( sync_t * sync ); int SyncMutexRevive_r( sync_t * sync );
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The SyncMutexRevive() and SyncMutexRevive_r() kernel calls revive a mutex, pointed to by sync, that's in the DEAD state. The mutex will be put into the LOCK state and will be owned by the calling thread. The mutex counter is set to one (for recursive mutexes).
These functions are similar, except for the way they indicate errors. See the Returns section for details.
See SyncMutexEvent() for information on how to get notified when a mutex enters the DEAD state.
The only difference between these functions is the way they indicate errors:
pthread_mutex_lock(), pthread_mutex_unlock(), SyncTypeCreate(), SyncDestroy(), SyncMutexEvent(), SyncMutexLock(), SyncMutexUnlock()