mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-01-10 03:16:29 +00:00
Removing useless func IsAlive, since it's handled by ISetAllocated
This commit is contained in:
parent
5222b429c5
commit
40b860c239
11 changed files with 1 additions and 36 deletions
|
@ -57,9 +57,6 @@ class KAutoObject {
|
||||||
return (u64)(uiptr)this;
|
return (u64)(uiptr)this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Is alive (checked for deletion)
|
|
||||||
virtual bool IsAlive() const = 0;
|
|
||||||
|
|
||||||
/// Virtual destructor
|
/// Virtual destructor
|
||||||
virtual ~KAutoObject();
|
virtual ~KAutoObject();
|
||||||
|
|
||||||
|
|
|
@ -16,13 +16,9 @@ class KInterruptEvent final : public KReadableEvent, public ISetAllocated<KInter
|
||||||
virtual ~KInterruptEvent();
|
virtual ~KInterruptEvent();
|
||||||
Result Initialize(int irqId, u32 flags);
|
Result Initialize(int irqId, u32 flags);
|
||||||
|
|
||||||
// KAutoObject
|
|
||||||
virtual bool IsAlive() const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// TODO: receiver
|
// TODO: receiver
|
||||||
int irqId = -1;
|
int irqId = -1;
|
||||||
bool isInitialized = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void intrusive_ptr_add_ref(KInterruptEvent *obj)
|
inline void intrusive_ptr_add_ref(KInterruptEvent *obj)
|
||||||
|
|
|
@ -17,7 +17,6 @@ class KResourceLimit final :
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MESOSPHERE_AUTO_OBJECT_TRAITS(AutoObject, ResourceLimit);
|
MESOSPHERE_AUTO_OBJECT_TRAITS(AutoObject, ResourceLimit);
|
||||||
virtual bool IsAlive() const override { return true; }
|
|
||||||
|
|
||||||
enum class Category : uint {
|
enum class Category : uint {
|
||||||
Memory = 0,
|
Memory = 0,
|
||||||
|
|
|
@ -28,11 +28,7 @@ class KEvent final :
|
||||||
|
|
||||||
Result Initialize();
|
Result Initialize();
|
||||||
|
|
||||||
/* KAutoObject */
|
|
||||||
virtual bool IsAlive() const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool isInitialized = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void intrusive_ptr_add_ref(KEvent *obj)
|
inline void intrusive_ptr_add_ref(KEvent *obj)
|
||||||
|
|
|
@ -15,7 +15,6 @@ class KProcess final : public KAutoObject {
|
||||||
public:
|
public:
|
||||||
MESOSPHERE_AUTO_OBJECT_TRAITS(AutoObject, Process);
|
MESOSPHERE_AUTO_OBJECT_TRAITS(AutoObject, Process);
|
||||||
|
|
||||||
virtual bool IsAlive() const override { return true; }
|
|
||||||
constexpr long GetSchedulerOperationCount() const { return schedulerOperationCount; }
|
constexpr long GetSchedulerOperationCount() const { return schedulerOperationCount; }
|
||||||
|
|
||||||
void IncrementSchedulerOperationCount() { ++schedulerOperationCount; }
|
void IncrementSchedulerOperationCount() { ++schedulerOperationCount; }
|
||||||
|
|
|
@ -18,8 +18,6 @@ class KReadableEvent : public KSynchronizationObject, public IClient<KEvent, KRe
|
||||||
MESOSPHERE_AUTO_OBJECT_TRAITS(SynchronizationObject, ReadableEvent);
|
MESOSPHERE_AUTO_OBJECT_TRAITS(SynchronizationObject, ReadableEvent);
|
||||||
MESOSPHERE_CLIENT_TRAITS(Event);
|
MESOSPHERE_CLIENT_TRAITS(Event);
|
||||||
|
|
||||||
virtual bool IsAlive() const override { return true; }
|
|
||||||
|
|
||||||
virtual ~KReadableEvent();
|
virtual ~KReadableEvent();
|
||||||
|
|
||||||
Result Signal();
|
Result Signal();
|
||||||
|
|
|
@ -17,8 +17,6 @@ class KWritableEvent final : public KAutoObject, public IServer<KEvent, KReadabl
|
||||||
MESOSPHERE_AUTO_OBJECT_TRAITS(AutoObject, WritableEvent);
|
MESOSPHERE_AUTO_OBJECT_TRAITS(AutoObject, WritableEvent);
|
||||||
MESOSPHERE_SERVER_TRAITS(Event);
|
MESOSPHERE_SERVER_TRAITS(Event);
|
||||||
|
|
||||||
virtual bool IsAlive() const override { return true; }
|
|
||||||
|
|
||||||
virtual ~KWritableEvent();
|
virtual ~KWritableEvent();
|
||||||
|
|
||||||
Result Signal();
|
Result Signal();
|
||||||
|
|
|
@ -123,7 +123,6 @@ class KThread final :
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual bool IsAlive() const override;
|
|
||||||
virtual void OnAlarm() override;
|
virtual void OnAlarm() override;
|
||||||
|
|
||||||
static constexpr uint GetPriorityOf(const KThread &thread)
|
static constexpr uint GetPriorityOf(const KThread &thread)
|
||||||
|
|
|
@ -13,13 +13,7 @@ Result KInterruptEvent::Initialize(int irqId, u32 flags)
|
||||||
// TODO implement
|
// TODO implement
|
||||||
(void)flags;
|
(void)flags;
|
||||||
this->irqId = irqId;
|
this->irqId = irqId;
|
||||||
isInitialized = true;
|
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KInterruptEvent::IsAlive() const
|
|
||||||
{
|
|
||||||
return isInitialized;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,18 +9,12 @@ KEvent::~KEvent()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KEvent::IsAlive() const
|
|
||||||
{
|
|
||||||
return isInitialized;
|
|
||||||
}
|
|
||||||
|
|
||||||
Result KEvent::Initialize()
|
Result KEvent::Initialize()
|
||||||
{
|
{
|
||||||
SetClientServerParent();
|
SetClientServerParent();
|
||||||
SetResourceOwner(KCoreContext::GetCurrentInstance().GetCurrentProcess());
|
SetResourceOwner(KCoreContext::GetCurrentInstance().GetCurrentProcess());
|
||||||
isInitialized = true;
|
|
||||||
|
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,11 +9,6 @@
|
||||||
namespace mesosphere
|
namespace mesosphere
|
||||||
{
|
{
|
||||||
|
|
||||||
bool KThread::IsAlive() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KThread::OnAlarm()
|
void KThread::OnAlarm()
|
||||||
{
|
{
|
||||||
CancelKernelSync();
|
CancelKernelSync();
|
||||||
|
|
Loading…
Reference in a new issue