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_mutex_init.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_mutex_init.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_mutex_init.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_mutex_init.html on line 8
Initialize a mutex
#include <audio_driver.h>
#define ado_mutex_init( mutex )
- mutex
- The mutex to initialize.
The mutex is of type pthread_mutex_t *.
The ado_mutex_init() macro initializes the given mutex.
This macro is defined as
pthread_mutex_init()
(passing NULL for the attr argument), or
ado_mutex_init_debug() if
ADO_MUTEX_DEBUG and ADO_DEBUG are defined.
The debug version uses
ado_debug()
to display a message to help you locate
a mutex problem in the driver.
For more information, see
“Debugging an audio driver”
in the Organization of a Driver chapter.
Same as
pthread_mutex_init():
- EOK
- Success.
- EAGAIN
- All kernel synchronization objects are in use.
- EBUSY
- Previously initialized but undestroyed mutex mutex.
- EFAULT
- A fault occurred when the kernel tried to access mutex or
attr.
- EINVAL
- The value specified by attr is invalid.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
ado_mutex_destroy(),
ado_mutex_lock(),
ado_mutex_unlock()
pthread_mutex_init()
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_mutex_init.html on line 133
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_mutex_init.html on line 133