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/ddk_en/audio/api-ref/ado_rwlock_wrlock.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/ddk_en/audio/api-ref/ado_rwlock_wrlock.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/ddk_en/audio/api-ref/ado_rwlock_wrlock.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/ddk_en/audio/api-ref/ado_rwlock_wrlock.html on line 8
Acquire an exclusive write lock on a read-write lock
#include <audio_driver.h>
int ado_rwlock_wrlock( pthread_rwlock_t *rwl );
- rwl
- A pointer to the pthread_rwlock_t structure for the
read-write lock.
This macro acquires an exclusive write lock on the given read-write lock.
The ado_rwlock_wrlock() macro is defined as
pthread_rwlock_wrlock(),
or ado_rwlock_wrlock_debug(),
if ADO_RWLOCK_DEBUG and ADO_DEBUG are defined.
The debug version uses
ado_debug()
to display a message, to aid in locating a locking problem in the driver.
For more information, see
“Debugging an audio driver”
in the Organization of a Driver chapter.
Same as
pthread_rwlock_wrlock():
- EOK
- Success.
- EAGAIN
- On the first use of a statically initialized read-write lock,
insufficient system resources existed to initialize the read-write
lock.
- EDEADLK
- The calling thread already has an exclusive lock for rwl.
- EFAULT
- A fault occurred when the kernel tried to access rwl.
- EINVAL
- The read-write lock rwl is invalid.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
ado_rwlock_destroy(),
ado_rwlock_init(),
ado_rwlock_rdlock(),
ado_rwlock_unlock()
pthread_rwlock_wrlock()
in the QNX Library Reference
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/ddk_en/audio/api-ref/ado_rwlock_wrlock.html on line 148
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/ddk_en/audio/api-ref/ado_rwlock_wrlock.html on line 148