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/syncmutexunlock.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/syncmutexunlock.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/syncmutexunlock.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/syncmutexunlock.html on line 8
Unlock a mutex synchronization object
#include <sys/neutrino.h>
int SyncMutexUnlock( sync_t * sync );
int SyncMutexUnlock_r( sync_t * sync );
- sync
- A pointer to the synchronization object for the mutex that you want
to unlock.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The SyncMutexUnlock() and SyncMutexUnlock_r()
kernel calls unlock the mutex
passed as sync. If there are threads blocked on the mutex,
the owner member of sync is set to the thread
ID of the thread with the highest priority that has been waiting the
longest and it's made ready to run. If no threads are waiting, it's
set to zero.
These functions are similar, except for the way they indicate errors.
See the Returns section for details.
If the calling thread had its priority boosted while it owned the
mutex, it returns to its normal priority.
These calls don't block.
The only difference between these functions is the way they indicate errors:
- SyncMutexUnlock()
- If an error occurs, The function returns -1 and sets
errno.
Any other value returned
indicates success.
- SyncMutexUnlock_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.
- EFAULT
- A fault occurred when the kernel tried to access the buffers provided.
- EINVAL
- The synchronization ID specified in sync doesn't exist. The calling thread doesn't own the mutex.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
pthread_mutex_lock(),
pthread_mutex_unlock(),
SyncTypeCreate(),
SyncMutexLock()
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/syncmutexunlock.html on line 183
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/syncmutexunlock.html on line 183