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 <[email protected]> --- bsd-user/freebsd/os-thread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.52.0
