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/syncmutexevent.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/syncmutexevent.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/syncmutexevent.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/syncmutexevent.html on line 8
Attach an event to a mutex
#include <sys/neutrino.h>
int SyncMutexEvent( sync_t * sync,
struct sigevent * event );
int SyncMutexEvent_r( sync_t * sync,
struct sigevent * event );
- sync
- A pointer to the synchronization object for the mutex that you want
to attach an event to.
- event
- A pointer to the
sigevent
structure that describes the event that you want to attach.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The SyncMutexEvent() is a kernel call that attaches a
specified event to a mutex pointed
to by sync. You use
SyncMutexRevive() to
revive a DEAD mutex. Normally, a mutex will be placed in the DEAD state
when the memory that was used to lock the mutex gets unmapped. One of the
ways this may happen is
when a process dies while holding the mutex in a shared memory.
SyncMutexEvent() and SyncMutexEvent_r()
are similar, except for the way they indicate errors.
See the Returns section for details.
The only difference between these functions is the way they indicate errors:
- SyncMutexEvent()
- If an error occurs, the function returns -1 and sets
errno.
Any other value returned
indicates success.
- SyncMutexEvent_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.
- EAGAIN
- All kernel synchronization event objects are in use.
- EFAULT
- A fault occurred when the kernel tried to access sync.
- EINVAL
- The synchronization object pointed to by sync doesn't exist.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
sigevent,
SyncCondvarSignal(),
SyncCondvarWait(),
SyncDestroy(),
SyncMutexLock(),
SyncMutexRevive(),
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/syncmutexevent.html on line 178
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/syncmutexevent.html on line 178