Revive a mutex that's in the DEAD state
#include <sys/neutrino.h> int SyncMutexRevive( sync_t * sync ); int SyncMutexRevive_r( sync_t * sync );
- A pointer to the synchronization object for the mutex that you want to revive.
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:
- If an error occurs, the function returns -1 and sets errno . Any other value returned indicates success.
- Returns EOK on success. This function does NOT set errno. If an error occurs, the function returns any value listed in the Errors section.
- A fault occurred when the kernel tried to access the buffers you provided.
- The synchronization object pointed to by sync doesn't exist or wasn't in the DEAD state.
- A kernel timeout unblocked the call. See TimerTimeout() .
Last modified: 2013-12-23