next up previous contents index
Next: 6.1.1 lock: Lock a Up: 6 Synchronization Interfaces Previous: 6 Synchronization Interfaces

6.1 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 possibility 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.





Utah Flux Research Group