libstratosphere: add ReadOnlySystemEvent helper

This commit is contained in:
Michael Scire
2018-11-07 23:20:48 -08:00
parent 9b1a2451b0
commit 6538554485
2 changed files with 10 additions and 5 deletions

View File

@@ -125,3 +125,8 @@ template <bool a = false>
static IEvent *CreateWriteOnlySystemEvent() {
return CreateSystemEvent([](u64 timeout) { std::abort(); return 0; }, a);
}
template <class F>
static IEvent *LoadReadOnlySystemEvent(Handle r_h, F f, bool autoclear = false) {
return new HosEvent<F>(r_h, f, autoclear);
}