RCriticalSection Class Reference

class RCriticalSection : private RSemaphore

A handle to a critical section.

A critical section itself is a kernel object, and is implemented using a semaphore. The class RCriticalSection inherits privately from RSemaphore as a matter of implementation and this is, in effect, equivalent to using a semaphore.

The public functions of RSemaphore are not part of the public API of this class.

As with all handles, they should be closed after use. This class provides the necessary Close() function, which should be called when the handle is no longer required.

RHandleBase::Close

Inherits from

Constructor & Destructor Documentation

RCriticalSection()

IMPORT_CRCriticalSection()

Member Functions Documentation

Close()

IMPORT_C voidClose()

CreateLocal(TOwnerType)

IMPORT_C TIntCreateLocal(TOwnerTypeaType = EOwnerProcess)

Parameters

TOwnerType aType = EOwnerProcess

IsBlocked()

TBool IsBlocked()const [inline]

Tests whether the critical section is occupied by any thread.

True, if the critical section is occupied by another thread. False, otherwise.

Signal()

IMPORT_C voidSignal()

Wait()

IMPORT_C voidWait()

Member Data Documentation

TInt iBlocked

TInt iBlocked[private]