Locks
The semantics of a ``lock'' allow the resource to be used by only
one thread at a time.
The Threads Library supports several types of locks:
-
mutual exclusion locks (``mutexes'')
-
spin locks
-
recursive mutual exclusion locks (``rmutexes'')
-
reader-writer locks (these allow non-exclusive access for readers)
A thread that successfully locks a resource is said
to ``hold the lock'' or
to ``have acquired the lock''.
Unlocking is also known as
``releasing the lock''.
Next topic:
Mutual exclusion locks
Previous topic:
Synchronizing threads
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005