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:
Augustin Cavalier 2019-09-13 21:36:59 -04:00
parent 19e017cb13
commit cf344027f8

View File

@ -24,6 +24,7 @@ typedef struct mutex {
spinlock lock;
#if KDEBUG
thread_id holder;
uint16 _unused;
#else
int32 count;
uint16 ignore_unlock_count;
@ -38,6 +39,8 @@ typedef struct recursive_lock {
mutex lock;
#if !KDEBUG
thread_id holder;
#else
int32 _unused;
#endif
int recursion;
} recursive_lock;