RMutex Class Reference

class RMutex : public RHandleBase

A handle to a mutex.

The mutex itself is a kernel side object.

Handles should be closed after use. RHandleBase provides the necessary Close() function which should be called when the handle is no longer required.

RHandleBase::Close

Inherits from

Member Functions Documentation

CreateGlobal(const TDesC &, TOwnerType)

IMPORT_C TIntCreateGlobal(const TDesC &aName,
TOwnerTypeaType = EOwnerProcess
)

Parameters

const TDesC & aName
TOwnerType aType = EOwnerProcess

CreateLocal(TOwnerType)

IMPORT_C TIntCreateLocal(TOwnerTypeaType = EOwnerProcess)

Parameters

TOwnerType aType = EOwnerProcess

IsHeld()

IMPORT_C TBoolIsHeld()

Open(const TFindMutex &, TOwnerType)

TInt Open(const TFindMutex &aFind,
TOwnerTypeaType = EOwnerProcess
)[inline]

Opens a handle to the global mutex found using a TFindMutex object.

A TFindMutex object is used to find all global mutexes whose full names match a specified pattern.

By default, any thread in the process can use this instance of RMutex to access the mutex. However, specifying EOwnerThread as the second parameter to this function, means that only the opening thread can use this instance of RMutex to access the mutex; any other thread in this process that wants to access the mutex must either duplicate the handle or use OpenGlobal() again.

KErrNone if successful, otherwise one of the other system wide error codes.

Parameters

const TFindMutex & aFindA reference to the object which is used to find the mutex.
TOwnerType aType = EOwnerProcessAn enumeration whose enumerators define the ownership of this mutex handle. If not explicitly specified, EOwnerProcess is taken as default.

Open(RMessagePtr2, TInt, TOwnerType)

IMPORT_C TIntOpen(RMessagePtr2aMessage,
TIntaParam,
TOwnerTypeaType = EOwnerProcess
)

Parameters

RMessagePtr2 aMessage
TInt aParam
TOwnerType aType = EOwnerProcess

Open(TInt, TOwnerType)

IMPORT_C TIntOpen(TIntaArgumentIndex,
TOwnerTypeaType = EOwnerProcess
)

Parameters

TInt aArgumentIndex
TOwnerType aType = EOwnerProcess

OpenGlobal(const TDesC &, TOwnerType)

IMPORT_C TIntOpenGlobal(const TDesC &aName,
TOwnerTypeaType = EOwnerProcess
)

Parameters

const TDesC & aName
TOwnerType aType = EOwnerProcess

Signal()

IMPORT_C voidSignal()

Wait()

IMPORT_C voidWait()