diff options
author | Maria Matejka <mq@ucw.cz> | 2023-01-20 14:07:38 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-01-20 18:31:57 +0100 |
commit | 343628d8c0f1848b968930f6dbabdd1174404b14 (patch) | |
tree | ab4e9fa467dc371529fc148c0fe1669864b47b74 /sysdep/unix/domain.c | |
parent | 1127f19a7a12b162064b1f521acd5c0017fbcf89 (diff) |
Fixed various build problems on FreeBSD and/or CLang
Diffstat (limited to 'sysdep/unix/domain.c')
-rw-r--r-- | sysdep/unix/domain.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdep/unix/domain.c b/sysdep/unix/domain.c index 1cba540b..f4ee595d 100644 --- a/sysdep/unix/domain.c +++ b/sysdep/unix/domain.c @@ -83,11 +83,15 @@ uint dg_order(struct domain_generic *dg) void do_lock(struct domain_generic *dg, struct domain_generic **lsp) { + struct lock_order stack_copy; + memcpy(&stack_copy, &locking_stack, sizeof(stack_copy)); + struct domain_generic **lll = last_locked; + if ((char *) lsp - (char *) &locking_stack != dg->order) bug("Trying to lock on bad position: order=%u, lsp=%p, base=%p", dg->order, lsp, &locking_stack); if (lsp <= last_locked) - bug("Trying to lock in a bad order"); + bug("Trying to lock in a bad order: %p %p", &stack_copy, lll); if (*lsp) bug("Inconsistent locking stack state on lock"); |