mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-14 15:14:23 -04:00
kern: update for new interrupt event locking scheme
This commit is contained in:
parent
c7f37f81ee
commit
b60054dba1
2 changed files with 32 additions and 27 deletions
|
@ -27,11 +27,10 @@ namespace ams::kern {
|
|||
class KInterruptEvent final : public KAutoObjectWithSlabHeapAndContainer<KInterruptEvent, KReadableEvent> {
|
||||
MESOSPHERE_AUTOOBJECT_TRAITS(KInterruptEvent, KReadableEvent);
|
||||
private:
|
||||
KInterruptEventTask *task;
|
||||
s32 interrupt_id;
|
||||
bool is_initialized;
|
||||
public:
|
||||
constexpr KInterruptEvent() : task(nullptr), interrupt_id(-1), is_initialized(false) { /* ... */ }
|
||||
constexpr KInterruptEvent() : interrupt_id(-1), is_initialized(false) { /* ... */ }
|
||||
virtual ~KInterruptEvent() { /* ... */ }
|
||||
|
||||
Result Initialize(int32_t interrupt_name, ams::svc::InterruptType type);
|
||||
|
@ -49,17 +48,19 @@ namespace ams::kern {
|
|||
class KInterruptEventTask : public KSlabAllocated<KInterruptEventTask>, public KInterruptTask {
|
||||
private:
|
||||
KInterruptEvent *event;
|
||||
s32 interrupt_id;
|
||||
KLightLock lock;
|
||||
public:
|
||||
constexpr KInterruptEventTask() : event(nullptr), interrupt_id(-1) { /* ... */ }
|
||||
constexpr KInterruptEventTask() : event(nullptr), lock() { /* ... */ }
|
||||
~KInterruptEventTask() { /* ... */ }
|
||||
|
||||
KLightLock &GetLock() { return this->lock; }
|
||||
|
||||
virtual KInterruptTask *OnInterrupt(s32 interrupt_id) override;
|
||||
virtual void DoTask() override;
|
||||
|
||||
void Unregister();
|
||||
void Unregister(s32 interrupt_id);
|
||||
public:
|
||||
static Result Register(KInterruptEventTask **out, s32 interrupt_id, bool level, KInterruptEvent *event);
|
||||
static Result Register(s32 interrupt_id, bool level, KInterruptEvent *event);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue