MeshMachine::AActivitySemaphore Class Reference
class MeshMachine::AActivitySemaphore : public MeshMachine::AContextStore |
Aggregate class for activities which wish to use mutexes.
After a serialised state or transition has been unblocked, signalled and invoked, AActivitySemaphore clears all of the synchronisation related information (e.g stored context), assuming that the job has been done. Sometimes however the serialised state, upon more careful inspection of the environment (context), may decide that it still does not want to be executed and it wishes to sleep again.
In such case it would call Wait() and return EIgnore from its TransitionTag(). The same applies to a serialised transition. It may want to call Wait() instead of, for example sending a request message.
After calling Wait() the serialised state will be woken up when the policy matches, which allows the serialised state to finish its job.
Inherits from
- MeshMachine::AActivitySemaphore
Constructor & Destructor Documentation
AActivitySemaphore()
AActivitySemaphore | ( | ) | [protected, inline, explicit] |
~AActivitySemaphore()
~AActivitySemaphore | ( | ) | [protected, inline] |
Member Functions Documentation
ClearIsTransition()
void | ClearIsTransition | ( | ) | [private, inline] |
ClearIsWaiting()
void | ClearIsWaiting | ( | ) | [protected, inline] |
ClearWillWait()
void | ClearWillWait | ( | ) | [protected, inline] |
IsTransition()
TBool
| IsTransition | ( | ) | const [private, inline] |
IsWaiting()
TBool
| IsWaiting | ( | ) | const [inline] |
Check if the activity is waiting
ParkState(const TNodeContextBase &)
Parameters
const TNodeContextBase & aContext | The context which the state is to run in. This will be stored |
ParkTransitionL(const TNodeContextBase &)
SetIsTransition()
void | SetIsTransition | ( | ) | [private, inline] |
SetIsWaiting()
void | SetIsWaiting | ( | ) | [protected, inline] |
SetWillWait()
void | SetWillWait | ( | ) | [protected, inline] |
Signal(TNodeContextBase &)
Signals to the activity that an event has occurred. Used for waking up sleeping activities which use mutexes. The activity is expected to check if the mutex has now cleared.
UnparkState(const TNodeContextBase &)
Wait()
Tell the activity to wait. The activity will wait until Signal() is called.
WillWait()
TBool
| WillWait | ( | ) | const [protected, inline] |
Check if the WillWait flag is set. The WillWait flag indicates whether the activity will be in a waiting state at the end of the signal function. This is distinct from "is waiting" which indicates whether the activity was waiting on entry to the Signal() function.
Member Enumerations Documentation
Enum anonymous
Enumerators
KIsWaiting = 0x1 | |
KWillWait = 0x2 | |
KIsTransition = 0x4 | |
Member Data Documentation
const TInt KInterfaceId
const TInt | KInterfaceId | [static] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.