meso: Implement KLightServerSession dtor
This commit is contained in:
@@ -21,7 +21,6 @@ class KLightClientSession final : public KAutoObject, public IClient<KLightSessi
|
||||
friend class KLightSession;
|
||||
|
||||
KClientPort *parentPort = nullptr;
|
||||
bool isRemoteActive = false;
|
||||
};
|
||||
|
||||
MESOSPHERE_AUTO_OBJECT_DEFINE_INCREF(LightClientSession);
|
||||
|
||||
@@ -38,12 +38,13 @@ class KLightServerSession final :
|
||||
virtual bool IsSignaled() const override;
|
||||
|
||||
private:
|
||||
|
||||
friend class KLightSession;
|
||||
|
||||
void Terminate(bool fromServer);
|
||||
|
||||
KThread::WaitList senderThreads{}, receiverThreads{};
|
||||
SharedPtr<KThread> currentSender{}, currentReceiver{};
|
||||
bool isRemoteActive = false;
|
||||
SharedPtr<KThread> currentSender{};
|
||||
KThread *currentReceiver = nullptr;
|
||||
};
|
||||
|
||||
MESOSPHERE_AUTO_OBJECT_DEFINE_INCREF(LightServerSession);
|
||||
|
||||
@@ -24,6 +24,14 @@ class KLightSession final :
|
||||
virtual ~KLightSession();
|
||||
|
||||
Result Initialize();
|
||||
|
||||
private:
|
||||
friend class KLightClientSession;
|
||||
friend class KLightServerSession;
|
||||
|
||||
void Terminate(bool fromServer);
|
||||
bool isClientAlive = false;
|
||||
bool isServerAlive = false;
|
||||
};
|
||||
|
||||
MESOSPHERE_AUTO_OBJECT_DEFINE_INCREF(LightSession);
|
||||
|
||||
@@ -242,6 +242,14 @@ class KThread final :
|
||||
void CancelKernelSync();
|
||||
/// Takes effect immediately
|
||||
void CancelKernelSync(Result res);
|
||||
/// Needs to be in kernel sync
|
||||
bool IsInKernelSync() const { return currentWaitList != nullptr; }
|
||||
|
||||
/// User sync
|
||||
constexpr bool IsWaitingSync() const { return isWaitingSync; }
|
||||
void SetWaitingSync(bool isWaitingSync) { this->isWaitingSync = isWaitingSync; }
|
||||
constexpr bool IsSyncCancelled() const { return isSyncCancelled; }
|
||||
void SetSyncCancelled(bool isSyncCancelled) { this->isSyncCancelled = isSyncCancelled; }
|
||||
|
||||
/// Takes effect when critical section is left
|
||||
void HandleSyncObjectSignaled(KSynchronizationObject *syncObj);
|
||||
@@ -295,7 +303,7 @@ private:
|
||||
uint basePriority = 64, priority = 64;
|
||||
int currentCoreId = -1;
|
||||
ulong affinityMask = 0;
|
||||
bool cancelled = false;
|
||||
bool isSyncCancelled = false;
|
||||
bool isWaitingSync = false;
|
||||
uiptr wantedMutex = 0;
|
||||
KThread *wantedMutexOwner = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user