| ![[Previous]](../prev.gif) | ![[Contents]](../contents.gif) | ![[Next]](../next.gif) | 
|  | This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. | 
Convert a pmd_attr_t exclusive lock to a shared lock
#include <sys/pm.h> int pmd_lock_downgrade(pmd_attr_t *pmd);
libpm
The pmd_lock_downgrade() is used to atomically convert an exclusive lock to a shared lock.
Any threads blocked in pmd_lock_exclusive() remain blocked until the shared lock is released.
This downgrade preserves the "exclusive preference" for the lock, and unblocks only threads blocked in pmd_lock_shared() if there are no threads waiting to acquire the exclusive lock.
For more information, see the device driver chapter.
| Safety: | |
|---|---|
| Cancellation point | Yes | 
| Interrupt handler | No | 
| Signal handler | Yes | 
| Thread | Yes | 
pmd_lock_upgrade(), pmd_lock_exclusive(), pmd_lock_shared(), pmd_unlock_shared(), pthread_sleepon_lock(), pthread_sleepon_unlock(), pthread_sleepon_broadcast()
| ![[Previous]](../prev.gif) | ![[Contents]](../contents.gif) | ![[Next]](../next.gif) |