[Previous] [Contents] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

pmd_lock_upgrade()

Upgrade a shared lock to an exclusive lock on a pmd_attr_t structure

Synopsis:

#include <sys/pm.h>

int pmd_lock_upgrade(pmd_attr_t *pmd); 

Arguments:

pmd
Pointer to the pmd_attr_t that's currently locked.

Library:

libpm

Description:

The pmd_lock_upgrade() converts a shared lock to an exclusive lock.

If there are other shared locks currently held, pmd_lock_upgrade() block until those locks are released. Any new attempts to acquire the shared lock is prevented and blocked in pmd_lock_shared().

Returns:

EOK
Success
Error code from pthread_sleepon_lock(), pthread_sleepon_wait(), and pthread_sleepon_unlock().
An error has occurred.

Examples:

For more information, see the device driver chapter.

Classification:

Neutrino

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pmd_lock_shared(), pthread_sleepon_lock(), pthread_sleepon_unlock(), pthread_sleepon_wait()


[Previous] [Contents] [Next]