From e0a27e2f477393464964b9c80577345583246057 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 3 Jun 2004 15:57:25 +0000 Subject: [PATCH] (FUTEX_CMP_REQUEUE): Define. (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE internally. Return non-zero if error, zero if success. --- sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index a7079a8490..fd4a7ca4bb 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -30,6 +30,7 @@ #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 #define FUTEX_REQUEUE 3 +#define FUTEX_CMP_REQUEUE 4 /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) @@ -61,14 +62,15 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) -#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex) \ +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 5, \ - (futexp), FUTEX_REQUEUE, (nr_wake), (nr_move), \ - (mutex)); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, \ + (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ + (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ })