DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
HDK Technical Reference

Spin locks (ODDI)

spin_locks.s:.XX "spin locks>ODDI" spin_locks.s:.XX "locks>spin, ODDI" spin_locks.s:.XX "locks>simple (mutex), ODDI" spin_locks.s:.XX "locks>read/write, ODDI" ODDI provides simple (mutex) spin locks for protecting ``Critical code section''critical code regions in drivers. Note that DDI provides a much richer set of ``Synchronization primitives''synchronization primitives for drivers; when porting an ODDI driver to DDI, the fastest approach is to convert all spin lock calls to DDI simple spin locks, but you may be able to improve the driver by using other synchronization primitives in some cases.

ODDI spin locking functions

Function Description
clockb(D3oddi),
cunlockb(D3oddi)
conditionally lock critical code sections
lockb(D3oddi), lockb5(D3oddi), unlockb(D3oddi) general locking functions
ilockb(D3oddi), iunlockb(D3oddi) block interrupts for short critical code sections
mdi_trylock(D3mdi), spin_locks.s:.XX "locks>trylock, ODDI"
mdi_tryunlock(D3mdi),
mdi_tryunlock_init(D3mdi)
MDI trylock functions
MPSTR_QLOCK(D3str), MPSTR_QRELE(D3str) lock STREAMS queue
MPSTR_STPLOCK(D3str), MPSTR_STPRELE(D3str) lock Stream head
tc_tlock(D3oddi), tc_tunlock(D3oddi),
tc_ctlock(D3oddi), tc_ctunlock(D3oddi)
mutual exclusion to a tty structure

Note the following about using the locking functions:


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