class RSemaphore : public RHandleBase |
A handle to a semaphore.
The semaphore itself is a Kernel side object.
As with all handles, they 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 &, TInt, TOwnerType) |
IMPORT_C TInt | CreateLocal(TInt, TOwnerType) |
TInt | Open(const TFindSemaphore &, 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 | Signal(TInt) |
IMPORT_C void | Wait() |
IMPORT_C TInt | Wait(TInt) |
Inherited Enumerations | |
---|---|
RHandleBase:TAttributes |
Inherited Attributes | |
---|---|
RHandleBase::iHandle |
IMPORT_C TInt | CreateGlobal | ( | const TDesC & | aName, |
TInt | aCount, | |||
TOwnerType | aType = EOwnerProcess | |||
) |
const TDesC & aName | |
TInt aCount | |
TOwnerType aType = EOwnerProcess |
IMPORT_C TInt | CreateLocal | ( | TInt | aCount, |
TOwnerType | aType = EOwnerProcess | |||
) |
TInt aCount | |
TOwnerType aType = EOwnerProcess |
TInt | Open | ( | const TFindSemaphore & | aFind, |
TOwnerType | aType = EOwnerProcess | |||
) | [inline] |
Opens a handle to the global semaphore found using a TFindSemaphore object.
A TFindSemaphore object is used to find all global semaphores whose full names match a specified pattern.
By default, any thread in the process can use this instance of RSemaphore to access the semaphore. However, specifying EOwnerThread as the second parameter to this function, means that only the opening thread can use this instance of RSemaphore to access the semaphore; any other thread in this process that wants to access the semaphore must either duplicate the handle or use OpenGlobal() again.
KErrNone if successful otherwise another of the system wide error codes.
const TFindSemaphore & aFind | A reference to the TFindSemaphore object used to find the semaphore. |
TOwnerType aType = EOwnerProcess | An enumeration whose enumerators define the ownership of this semaphore 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 |