diff mbox series

[66/66] bsd-user: freebsd_unlock_umutex: make flags 32 bits

Message ID 20260515-misc-2026q2-v1-66-5438ca41b27a@bsdimp.com
State New
Headers show
Series bsd-user: Upstream most of the remaining system calls | expand

Commit Message

Warner Losh May 15, 2026, 9:20 p.m. UTC
Since we're writing flags to m_owner, which is 32 bits, we need to have
it be 32-bits. This also fixes the problem when we were trying to add
the TARGET_UMUTEX_CONTESTED flag, which is bigger than 16 bits.

Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/freebsd/os-thread.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/bsd-user/freebsd/os-thread.c b/bsd-user/freebsd/os-thread.c
index 86dea0aea2..9ed5fade41 100644
--- a/bsd-user/freebsd/os-thread.c
+++ b/bsd-user/freebsd/os-thread.c
@@ -1033,8 +1033,7 @@  abi_long freebsd_unlock_umutex(abi_ulong target_addr, uint32_t id)
     return optimized_umtx_op(target_addr, UMTX_OP_MUTEX_UNLOCK, 0, NULL, NULL);
 #else
     struct target_umutex *target_umutex;
-    uint32_t count, owner, *addr;
-    uint16_t flags;
+    uint32_t count, owner, *addr, flags;
 
     if (!lock_user_struct(VERIFY_WRITE, target_umutex, target_addr, 0)) {
         return -TARGET_EFAULT;