diff --git a/stratosphere/libstratosphere/include/stratosphere/event.hpp b/stratosphere/libstratosphere/include/stratosphere/event.hpp index ba726d557..153cdd0df 100644 --- a/stratosphere/libstratosphere/include/stratosphere/event.hpp +++ b/stratosphere/libstratosphere/include/stratosphere/event.hpp @@ -125,3 +125,8 @@ template static IEvent *CreateWriteOnlySystemEvent() { return CreateSystemEvent([](u64 timeout) { std::abort(); return 0; }, a); } + +template +static IEvent *LoadReadOnlySystemEvent(Handle r_h, F f, bool autoclear = false) { + return new HosEvent(r_h, f, autoclear); +} diff --git a/stratosphere/libstratosphere/include/stratosphere/message_queue.hpp b/stratosphere/libstratosphere/include/stratosphere/message_queue.hpp index f8b4c6591..8ed2bae7f 100644 --- a/stratosphere/libstratosphere/include/stratosphere/message_queue.hpp +++ b/stratosphere/libstratosphere/include/stratosphere/message_queue.hpp @@ -56,11 +56,6 @@ class HosMessageQueue { bool TryPeek(uintptr_t *out); bool TimedPeek(uintptr_t *out, u64 timeout); private: - void SendInternal(uintptr_t data); - void SendNextInternal(uintptr_t data); - uintptr_t ReceiveInternal(); - uintptr_t PeekInternal(); - bool IsFull() { return this->count >= this->capacity; } @@ -68,6 +63,11 @@ class HosMessageQueue { bool IsEmpty() { return this->count == 0; } + + void SendInternal(uintptr_t data); + void SendNextInternal(uintptr_t data); + uintptr_t ReceiveInternal(); + uintptr_t PeekInternal(); };