SCO OpenServer
mdi_trylock(D3mdi)
mdi_trylock, mdi_tryunlock, mdi_tryunlock_init --
MDI trylock functions
Synopsis (Not in SVR5 version)
#include <sys/mdi.h>
int mdi_trylock(trylock_t * trylock);
void mdi_tryunlock(trylock_t * trylock);
void mdi_trylock_init(trylock_t * trylock);
Description
The
mdi_trylock( )
functions handle the trylocks used
to code MP-aware MDI drivers.
mdi_trylock( )
attempts to acquire the specified trylock.
mdi_tryunlock( )
Frees the specified trylock.
If the trylock is not held,
mdi_tryunlock( )
panics the system by calling
cmn_err(D3)
with the CE_PANIC flag set.
mdi_trylock_init( )
initializes the specified trylock.
This function is usually called from the driver's
open( )
routine to ensure that any locks
held from a previous open are cleared
to the initial, unlocked state.
Context and synchronization
Blockable
context.
Hardware applicability
All
Version applicability
mdi:
1
Differences between versions
This function is not supported in MDI on SVR5
systems.
Return values
mdi_trylock( )
returns non-zero if successful, 0 if lock already held.
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005