next up previous contents index
Next: 4.10.1 lock: Lock a Up: 4 The Component Object Previous: 4.9.4 oskit_lookup_first: Obtain the

4.10 oskit_lock: Thread-safe lock interface

 

The oskit_lock COM interface allows components to protect data structures from concurrent access by multiple threads. The interface is intended to be generic so that components do not need to know the specifics of any particular thread system. The user of a lock should be prepared for the possibilty that the thread will be put to sleep if the lock cannot be granted. There are two variants supported; a regular lock and a critical lock. A critical lock differs only in that interrupts are blocked while the lock is held. The oskit_lock COM interface inherits from oskit_iunknown, and has the following additional methods:

lock
Lock a lock.
unlock
Unlock a lock.





University of Utah Flux Research Group