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.
Public Member Functions | |
---|---|
RCriticalSection() | |
IMPORT_C void | Close() |
IMPORT_C TInt | CreateLocal(TOwnerType) |
TBool | IsBlocked() |
IMPORT_C void | Signal() |
IMPORT_C void | Wait() |
Inherited Enumerations | |
---|---|
RHandleBase:TAttributes |
Private Attributes | |
---|---|
TInt | iBlocked |
Inherited Attributes | |
---|---|
RHandleBase::iHandle |
IMPORT_C TInt | CreateLocal | ( | TOwnerType | aType = EOwnerProcess | ) |
TOwnerType aType = EOwnerProcess |
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.