mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 15:28:58 +01:00
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:
parent
19e017cb13
commit
cf344027f8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user