17 #include <pia/clone/clone_definitions.h> 18 #include <pia/clone/clone_SharingClone.h> 88 return static_cast<LockStatus>(m_LockStatus & cLockStatusMask);
97 virtual void Trace(u64 flag)
const;
103 virtual void OnStartup();
104 virtual void OnCleanup();
105 virtual void OnEnd();
108 virtual void OnDisconnect(
StationIndex stationId,
bool isValid);
110 virtual void OnAddParticipant(
StationIndex stationIndex);
128 static Type GetTypeStatic()
132 static Key ToKey(
Id id)
136 virtual Type GetTypeVirtual()
const 138 return GetTypeStatic();
142 class LockCommandToken :
public ClockCommandToken
146 : ClockCommandToken(pClone), m_DestBitmap(0)
149 virtual CommandType GetType()
const 153 virtual u32 GetDestStationBitmap()
const 157 virtual bool IsUnicast()
const 161 void SetDestBitmap(u32 destBitmap)
163 PIA_TRACE_EX(
common::TRACE_FLAG_CLONE,
"called LockCommandToken key:0x%016llx state:%d dest:0x%08x -> 0x%08x", GetClone() != NULL ? GetClone()->GetKey() : 0, GetClone() != NULL ? GetClone()->GetState() : 0, m_DestBitmap, destBitmap);
164 m_DestBitmap = destBitmap;
168 PIA_TRACE_EX(
common::TRACE_FLAG_CLONE,
"called LockCommandToken key:0x%016llx state:%d dest:0x%08x -> 0x%08x", GetClone() != NULL ? GetClone()->GetKey() : 0, GetClone() != NULL ? GetClone()->GetState() : 0, m_DestBitmap, m_DestBitmap & ~(0x1 << stationId));
169 m_DestBitmap &= ~(0x1 << stationId);
180 virtual bool IsReadyToSetValue()
const;
193 cLockStatusMask = 0xf0
196 InnerLockStatus m_LockStatus;
200 LockCommandToken m_LockCommandToken;
203 template <
int TEST_ID,
typename Arg>
u32 ClockValue
Defines a type that holds a clock value.
Definition: clone_definitions.h:44
This class is a derivative of CloneBase and provides functionality for bidirectional sending and rece...
Definition: clone_SharingClone.h:34
StationIndex
Enumerates StationIndex values.
Definition: platformCtr.h:44
ID indicating a station that is not present in the session.
Definition: platformCtr.h:59
virtual ~AtomicSharingClone()
Destroys the object (destructor).
LockStatus GetLockStatus() const
Gets the status of the lock.
Definition: clone_AtomicSharingClone.h:86
LockStatus
Enumerates the status of the lock.
Definition: clone_AtomicSharingClone.h:74
nn::Result TryLock()
Attempts to acquire a lock on sending.
Specifies that the station is attempting to acquire the lock.
Definition: clone_AtomicSharingClone.h:77
nn::Result Unlock()
Releases the send lock.
AtomicSharingClone()
Instantiates the object with default parameters (default constructor).
Specifies that the station does not have the lock.
Definition: clone_AtomicSharingClone.h:76
virtual void Trace(u64 flag) const
Prints information that is useful for debugging.
static const TraceFlag TRACE_FLAG_CLONE
Flag for tracing the PiaClone module.
Definition: common_Trace.h:174
u32 Id
Specifies the type of the ID for identifying clones.
Definition: clone_CloneBase.h:68
This class is a derivative of CloneBase and provides functionality for exclusively controlling the lo...
Definition: clone_AtomicSharingClone.h:33
Specifies that the station has the lock.
Definition: clone_AtomicSharingClone.h:78