Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncmutexrevive.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncmutexrevive.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncmutexrevive.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncmutexrevive.html on line 8

SyncMutexRevive(), SyncMutexRevive_r()

Revive a mutex that's in the DEAD state

Synopsis:

#include <sys/neutrino.h>

int SyncMutexRevive( sync_t * sync );

int SyncMutexRevive_r( sync_t * sync );

Arguments:

sync
A pointer to the synchronization object for the mutex that you want to revive.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

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.

Returns:

The only difference between these functions is the way they indicate errors:

SyncMutexRevive()
If an error occurs, the function returns -1 and sets errno. Any other value returned indicates success.
SyncMutexRevive_r()
Returns EOK on success. This function does NOT set errno. If an error occurs, the function returns any value listed in the Errors section.

Errors:

EFAULT
A fault occurred when the kernel tried to access the buffers you provided.
EINVAL
The synchronization object pointed to by sync doesn't exist or wasn't in the DEAD state.
ETIMEDOUT
A kernel timeout unblocked the call. See TimerTimeout().

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pthread_mutex_lock(), pthread_mutex_unlock(), SyncTypeCreate(), SyncDestroy(), SyncMutexEvent(), SyncMutexLock(), SyncMutexUnlock()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncmutexrevive.html on line 173

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncmutexrevive.html on line 173