1
0
Fork 0
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:
TuxSH 2018-11-07 01:16:35 +01:00 committed by Michael Scire
parent 5222b429c5
commit 40b860c239
11 changed files with 1 additions and 36 deletions

View file

@ -57,9 +57,6 @@ class KAutoObject {
return (u64)(uiptr)this;
}
/// Is alive (checked for deletion)
virtual bool IsAlive() const = 0;
/// Virtual destructor
virtual ~KAutoObject();

View file

@ -16,13 +16,9 @@ class KInterruptEvent final : public KReadableEvent, public ISetAllocated<KInter
virtual ~KInterruptEvent();
Result Initialize(int irqId, u32 flags);
// KAutoObject
virtual bool IsAlive() const override;
private:
// TODO: receiver
int irqId = -1;
bool isInitialized = false;
};
inline void intrusive_ptr_add_ref(KInterruptEvent *obj)

View file

@ -17,7 +17,6 @@ class KResourceLimit final :
public:
MESOSPHERE_AUTO_OBJECT_TRAITS(AutoObject, ResourceLimit);
virtual bool IsAlive() const override { return true; }
enum class Category : uint {
Memory = 0,

View file

@ -28,11 +28,7 @@ class KEvent final :
Result Initialize();
/* KAutoObject */
virtual bool IsAlive() const override;
private:
bool isInitialized = false;
};
inline void intrusive_ptr_add_ref(KEvent *obj)

View file

@ -15,7 +15,6 @@ class KProcess final : public KAutoObject {
public:
MESOSPHERE_AUTO_OBJECT_TRAITS(AutoObject, Process);
virtual bool IsAlive() const override { return true; }
constexpr long GetSchedulerOperationCount() const { return schedulerOperationCount; }
void IncrementSchedulerOperationCount() { ++schedulerOperationCount; }

View file

@ -18,8 +18,6 @@ class KReadableEvent : public KSynchronizationObject, public IClient<KEvent, KRe
MESOSPHERE_AUTO_OBJECT_TRAITS(SynchronizationObject, ReadableEvent);
MESOSPHERE_CLIENT_TRAITS(Event);
virtual bool IsAlive() const override { return true; }
virtual ~KReadableEvent();
Result Signal();

View file

@ -17,8 +17,6 @@ class KWritableEvent final : public KAutoObject, public IServer<KEvent, KReadabl
MESOSPHERE_AUTO_OBJECT_TRAITS(AutoObject, WritableEvent);
MESOSPHERE_SERVER_TRAITS(Event);
virtual bool IsAlive() const override { return true; }
virtual ~KWritableEvent();
Result Signal();

View file

@ -123,7 +123,6 @@ class KThread final :
public:
virtual bool IsAlive() const override;
virtual void OnAlarm() override;
static constexpr uint GetPriorityOf(const KThread &thread)

View file

@ -13,13 +13,7 @@ Result KInterruptEvent::Initialize(int irqId, u32 flags)
// TODO implement
(void)flags;
this->irqId = irqId;
isInitialized = true;
return ResultSuccess();
}
bool KInterruptEvent::IsAlive() const
{
return isInitialized;
}
}

View file

@ -9,16 +9,10 @@ KEvent::~KEvent()
{
}
bool KEvent::IsAlive() const
{
return isInitialized;
}
Result KEvent::Initialize()
{
SetClientServerParent();
SetResourceOwner(KCoreContext::GetCurrentInstance().GetCurrentProcess());
isInitialized = true;
return ResultSuccess();
}

View file

@ -9,11 +9,6 @@
namespace mesosphere
{
bool KThread::IsAlive() const
{
return true;
}
void KThread::OnAlarm()
{
CancelKernelSync();