DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

os_mutex_lock(D3psm)


os_mutex_lock -- acquire a simple exclusion lock

Synopsis

   ms_lockstate_t os_mutex_lock(ms_lockp_t lockp)

Description

os_mutex_lock acquires a simple mutual exclusion lock (simple lock) identified by lockp. The lock must previously have been initialized by os_mutex_alloc(D3psm).

Interrupts will be disabled by clearing the processor's internal interrupt enable flag on return. The returned value holds the previous state of the interrupt enable flag. It must be passed as an argument to a matching call to os_mutex_unlock(D3psm).

Simple locks may be nested. No core kernel functions except os_mutex_lock and os_mutex_unlock may be called while simple locks are being held. os_mutex_lock may not be called from pfxinitpsm.

Arguments


lockp
pointer to the lock structure

Return values

Returns an ms_lockstate_t opaque lock status to be passed to the paired os_mutex_unlock(D3psm).

Usage

Hardware applicability

All.

Version applicability

psm: 2

References

os_mutex_unlock(D3psm), os_mutex_alloc(D3psm)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - 19 June 2005