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.
Public Member Functions | |
---|---|
IMPORT_C TInt | CreateGlobal(const TDesC &, TOwnerType) |
IMPORT_C TInt | CreateLocal(TOwnerType) |
IMPORT_C TBool | IsHeld() |
TInt | Open(const TFindMutex &, TOwnerType) |
IMPORT_C TInt | Open(RMessagePtr2, TInt, TOwnerType) |
IMPORT_C TInt | Open(TInt, TOwnerType) |
IMPORT_C TInt | OpenGlobal(const TDesC &, TOwnerType) |
IMPORT_C void | Signal() |
IMPORT_C void | Wait() |
Inherited Enumerations | |
---|---|
RHandleBase:TAttributes |
Inherited Attributes | |
---|---|
RHandleBase::iHandle |
IMPORT_C TInt | CreateGlobal | ( | const TDesC & | aName, |
TOwnerType | aType = EOwnerProcess | |||
) |
const TDesC & aName | |
TOwnerType aType = EOwnerProcess |
IMPORT_C TInt | CreateLocal | ( | TOwnerType | aType = EOwnerProcess | ) |
TOwnerType aType = EOwnerProcess |
TInt | Open | ( | const TFindMutex & | aFind, |
TOwnerType | aType = 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.
const TFindMutex & aFind | A reference to the object which is used to find the mutex. |
TOwnerType aType = EOwnerProcess | An enumeration whose enumerators define the ownership of this mutex handle. If not explicitly specified, EOwnerProcess is taken as default. |
IMPORT_C TInt | Open | ( | RMessagePtr2 | aMessage, |
TInt | aParam, | |||
TOwnerType | aType = EOwnerProcess | |||
) |
RMessagePtr2 aMessage | |
TInt aParam | |
TOwnerType aType = EOwnerProcess |
IMPORT_C TInt | Open | ( | TInt | aArgumentIndex, |
TOwnerType | aType = EOwnerProcess | |||
) |
TInt aArgumentIndex | |
TOwnerType aType = EOwnerProcess |
IMPORT_C TInt | OpenGlobal | ( | const TDesC & | aName, |
TOwnerType | aType = EOwnerProcess | |||
) |
const TDesC & aName | |
TOwnerType aType = EOwnerProcess |