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/_sleepon_wait.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/_sleepon_wait.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/_sleepon_wait.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/_sleepon_wait.html on line 8
Wait on a sleepon lock
#include <pthread.h>
int _sleepon_wait( sleepon_t * l,
const volatile void * addr,
_uint64 nsec);
- l
- A pointer to a sleepon_t that you created by calling
_sleepon_init().
- addr
- The handle that you want to wait on.
The value of addr is typically a data structure that controls a
resource.
- nsec
- Zero, or the amount of time, in nanoseconds, to wait before the thread
wakes up.
If this timeout occurs, ETIMEDOUT is returned.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The _sleepon_wait() function blocks on the sleepon l using the key addr until woken up by either a
_sleepon_signal() or a
_sleepon_broadcast()
call that uses the same addr key.
The calling thread must first have locked the sleepon by calling
_sleepon_lock().
When the thread returns from this function, it must release the
sleepon lock by calling
_sleepon_unlock().
- 0
- Success.
- ≠0
- Failure; a nonzero
errno value.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
_sleepon_broadcast(),
_sleepon_lock(),
_sleepon_unlock(),
_sleepon_signal()
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/_sleepon_wait.html on line 149
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/_sleepon_wait.html on line 149