kern: implement SvcCreateInterruptEvent

This commit is contained in:
Michael Scire authored and SciresM committed 2020-07-31 14:50:52 -07:00
1 parent b35380a942
commit 04f325cf5a
8 files changed
+239 -8

No files matched your search

@@ -230,7 +230,7 @@ namespace ams::kern {
}
}
bool SetInterruptAllowed(u32 id) {
bool SetInterruptPermitted(u32 id) {
constexpr size_t BitsPerWord = BITSIZEOF(this->irq_access_flags[0]);
if (id < BITSIZEOF(this->irq_access_flags)) {
this->irq_access_flags[id / BitsPerWord] = (1ul << (id % BitsPerWord));
@@ -274,6 +274,15 @@ namespace ams::kern {
}
}
constexpr bool IsPermittedInterrupt(u32 id) const {
constexpr size_t BitsPerWord = BITSIZEOF(this->irq_access_flags[0]);
if (id < BITSIZEOF(this->irq_access_flags)) {
return (this->irq_access_flags[id / BitsPerWord] & (1ul << (id % BitsPerWord))) != 0;
} else {
return false;
}
}
/* TODO: Member functions. */
};