mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-19 22:57:50 +00:00
kernel: refactor priority inheritance to represent locks as C++ objects
This commit is contained in:
parent
a269b9b8e5
commit
f4e795193b
8 changed files with 435 additions and 189 deletions
|
@ -33,6 +33,9 @@
|
|||
|
||||
namespace Kernel::Init {
|
||||
|
||||
// For macro convenience.
|
||||
using KThreadLockInfo = KThread::LockWithPriorityInheritanceInfo;
|
||||
|
||||
#define SLAB_COUNT(CLASS) kernel.SlabResourceCounts().num_##CLASS
|
||||
|
||||
#define FOREACH_SLAB_TYPE(HANDLER, ...) \
|
||||
|
@ -54,7 +57,8 @@ namespace Kernel::Init {
|
|||
HANDLER(KResourceLimit, (SLAB_COUNT(KResourceLimit)), ##__VA_ARGS__) \
|
||||
HANDLER(KEventInfo, (SLAB_COUNT(KThread) + SLAB_COUNT(KDebug)), ##__VA_ARGS__) \
|
||||
HANDLER(KDebug, (SLAB_COUNT(KDebug)), ##__VA_ARGS__) \
|
||||
HANDLER(KSecureSystemResource, (SLAB_COUNT(KProcess)), ##__VA_ARGS__)
|
||||
HANDLER(KSecureSystemResource, (SLAB_COUNT(KProcess)), ##__VA_ARGS__) \
|
||||
HANDLER(KThreadLockInfo, (SLAB_COUNT(KThread)), ##__VA_ARGS__)
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue