|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
A fast semaphore. More...
#include <e32cmn.h>
Public Member Functions | |
| RFastLock () | |
| Default constructor. | |
| IMPORT_C TInt | CreateLocal (TOwnerType aType=EOwnerProcess) |
| Creates a local fast semaphore, and opens this handle to the semaphore. | |
| IMPORT_C void | Wait () |
| Waits for a signal on the semaphore. | |
| IMPORT_C TInt | Wait (TInt aTimeout) |
| IMPORT_C TInt | Poll () |
| IMPORT_C void | Signal () |
| Signals the semaphore once. | |
Public Member Functions inherited from RSemaphore | |
| TInt | Open (const TFindSemaphore &aFind, TOwnerType aType=EOwnerProcess) |
| Opens a handle to the global semaphore found using a TFindSemaphore object. | |
| IMPORT_C TInt | CreateLocal (TInt aCount, TOwnerType aType=EOwnerProcess) |
| Creates a semaphore, setting its initial count, and opens this handle to the semaphore. | |
| IMPORT_C TInt | CreateGlobal (const TDesC &aName, TInt aCount, TOwnerType aType=EOwnerProcess) |
| Creates a global semaphore, setting its initial count, and opens this handle to the semaphore. | |
| IMPORT_C TInt | OpenGlobal (const TDesC &aName, TOwnerType aType=EOwnerProcess) |
| Opens a handle to a global semaphore. | |
| IMPORT_C TInt | Open (RMessagePtr2 aMessage, TInt aParam, TOwnerType aType=EOwnerProcess) |
| Opens a handle to a semaphore using a handle number sent by a client to a server. | |
| IMPORT_C TInt | Open (TInt aArgumentIndex, TOwnerType aType=EOwnerProcess) |
| Opens a handle to a semaphore using a handle number passed as an environment data item to the child process during the creation of that child process. | |
| IMPORT_C void | Wait () |
| Waits for a signal on the semaphore. | |
| IMPORT_C TInt | Wait (TInt aTimeout) |
| Waits for a signal on the semaphore, or a timeout. | |
| IMPORT_C TInt | Poll () |
| IMPORT_C void | Signal () |
| Signals the semaphore once. | |
| IMPORT_C void | Signal (TInt aCount) |
| Signals the semaphore one or more times. | |
Public Member Functions inherited from RHandleBase | |
| RHandleBase () | |
| Default constructor. | |
| TInt | Handle () const |
| Retrieves the handle-number of the object associated with this handle. | |
| void | SetHandle (TInt aHandle) |
| Sets the handle-number of this handle to the specified value. | |
| TInt | SetReturnedHandle (TInt aHandleOrError) |
| Sets the handle-number of this handle to the specified value. | |
| IMPORT_C void | Close () |
| Closes the handle. | |
| IMPORT_C TName | Name () const |
| Gets the name of the handle. | |
| IMPORT_C TFullName | FullName () const |
| Gets the full name of the handle. | |
| IMPORT_C void | FullName (TDes &aName) const |
| Gets the full name of the handle. | |
| IMPORT_C void | SetHandleNC (TInt aHandle) |
| Sets the handle-number of this handle to the specified value, and marks it as not closable. | |
| IMPORT_C TInt | Duplicate (const RThread &aSrc, TOwnerType aType=EOwnerProcess) |
| Creates a valid handle to the kernel object for which the specified thread already has a handle. | |
| IMPORT_C void | HandleInfo (THandleInfo *anInfo) |
| Gets information about the handle. | |
| IMPORT_C TUint | Attributes () const |
| IMPORT_C TInt | BTraceId () const |
| Returns a unique object identifier for use with BTrace. | |
| IMPORT_C void | NotifyDestruction (TRequestStatus &aStatus) |
| Internal technology API. | |
Additional Inherited Members | |
Public Types inherited from RHandleBase | |
| enum | TAttributes { EReadAccess =0x1 , EWriteAccess =0x2 , EDirectReadAccess =0x4 , EDirectWriteAccess =0x8 } |
| Read/Write attributes for the handle. More... | |
Static Public Member Functions inherited from RHandleBase | |
| static void | DoExtendedClose () |
Protected Member Functions inherited from RHandleBase | |
| RHandleBase (TInt aHandle) | |
| Copy constructor. | |
| IMPORT_C TInt | Open (const TFindHandleBase &aHandle, TOwnerType aType) |
| Opens a handle to a kernel side object found using a find-handle object. | |
| TInt | OpenByName (const TDesC &aName, TOwnerType aOwnerType, TInt aObjectType) |
| Implementation for RXxxxx::Open/OpenGlocbal(const TDesC &aName,,TOwnerType aType) functions. | |
Static Protected Member Functions inherited from RHandleBase | |
| static TInt | SetReturnedHandle (TInt aHandleOrError, RHandleBase &aHandle) |
Protected Attributes inherited from RHandleBase | |
| TInt | iHandle |
A fast semaphore.
This is a layer over a standard semaphore, and only calls into the kernel side if there is contention.
|
inline |
Default constructor.
(generated from Symbian Developer Library)
| IMPORT_C TInt RFastLock::CreateLocal | ( | TOwnerType | aType = EOwnerProcess | ) |
Creates a local fast semaphore, and opens this handle to the semaphore.
| aType | An enumeration whose enumerators define the ownership of this semaphore handle. If not explicitly specified, EOwnerProcess is taken as default. |
(generated from Symbian Developer Library)
| IMPORT_C TInt RFastLock::Poll | ( | ) |
| IMPORT_C void RFastLock::Signal | ( | ) |
Signals the semaphore once.
The function increments the semaphore count by one. If the count was negative before being incremented, the highest priority thread waiting on the semaphore's queue of threads is removed from that queue and, provided that it is not suspended for any other reason, is marked as ready to run.
(generated from Symbian Developer Library)
| IMPORT_C void RFastLock::Wait | ( | ) |
Waits for a signal on the semaphore.
The function decrements the semaphore count by one and returns immediately if it is zero or positive.
If the semaphore count is negative after being decremented, the calling thread is added to a queue of threads maintained by this semaphore.
The thread waits until the semaphore is signalled. More than one thread can be waiting on a particular semaphore at a time. When there are multiple threads waiting on a semaphore, they are released in priority order.
If the semaphore is deleted, all threads waiting on that semaphore are released.
(generated from Symbian Developer Library)
| IMPORT_C TInt RFastLock::Wait | ( | TInt | aTimeout | ) |