Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pthread_mutex_init error handeling

42 views
Skip to first unread message

jop

unread,
Apr 28, 2012, 8:17:57 PM4/28/12
to
QNX documentation specifies the following return values for pthread_mutex_init()

EOK - Success.
EAGAIN - All kernel synchronization objects are in use.
EBUSY - The given mutex was previously initialized and hasn't been destroyed.
EFAULT - A fault occurred when the kernel tried to access mutex or attr.
EINVAL - The value specified by attr is invalid.

What would be correct handling for each of these code?

Also IEEE Std 1003.1-2008, specifies the following
[EAGAIN] - The system lacked the necessary resources (other than memory) to initialize another mutex.
[ENOMEM] - Insufficient memory exists to initialize the mutex.
[EPERM] - The caller does not have the privilege to perform the operation.


Why are ENOMEM and EPERM not specified in QNX?
0 new messages