kernel: Add padding in mutex fields for equivalent KDEBUG/non-KDEBUG sizing.
Non-KDEBUG kernels and kernel add-ons use atomic operations to acquire and release the locks inline, so non-KDEBUG kernels/addons are only compatible with other non-KDEBUG kernels/addons. Following this change, though, KDEBUG kernels/addons should be able to run under non-KDEBUG kernels/addons, too, since they always call into the actual kernel functions and do not inline anything of consequence.
This commit is contained in:
@@ -24,6 +24,7 @@ typedef struct mutex {
|
|||||||
spinlock lock;
|
spinlock lock;
|
||||||
#if KDEBUG
|
#if KDEBUG
|
||||||
thread_id holder;
|
thread_id holder;
|
||||||
|
uint16 _unused;
|
||||||
#else
|
#else
|
||||||
int32 count;
|
int32 count;
|
||||||
uint16 ignore_unlock_count;
|
uint16 ignore_unlock_count;
|
||||||
@@ -38,6 +39,8 @@ typedef struct recursive_lock {
|
|||||||
mutex lock;
|
mutex lock;
|
||||||
#if !KDEBUG
|
#if !KDEBUG
|
||||||
thread_id holder;
|
thread_id holder;
|
||||||
|
#else
|
||||||
|
int32 _unused;
|
||||||
#endif
|
#endif
|
||||||
int recursion;
|
int recursion;
|
||||||
} recursive_lock;
|
} recursive_lock;
|
||||||
|
|||||||
Reference in New Issue
Block a user