ULAPI  8.0
Public Member Functions | List of all members
ULLock Class Referenceabstract

ULLock is an abstract class describing a simple mutual exclusion primitive. Each operating system or environment will require a different implementation. More...

#include <ullock.h>

Public Member Functions

virtual ~ULLock ()
 
virtual void claim ()=0
 
virtual void release ()=0
 

Detailed Description

ULLock is an abstract class describing a simple mutual exclusion primitive. Each operating system or environment will require a different implementation.

Constructor & Destructor Documentation

virtual ULLock::~ULLock ( )
inlinevirtual

Member Function Documentation

virtual void ULLock::claim ( )
pure virtual

If this lock is currently unclaimed, the caller of claim() is granted ownership of the lock. Otherwise, the calling thread is put to sleep until the lock is released. When claim() returns, the caller has ownership of the lock. As usual with locking primitives, it's important to nest calls to claim() and release() properly so as to avoid deadlock.

virtual void ULLock::release ( )
pure virtual

When called by the thread that currently has ownership of this lock, release() causes the thread to relinquish ownership. Otherwise, release() does nothing (though a good implementation of ULLock should fire an assertion in such a case).


The documentation for this class was generated from the following file: