[PATCH]: little MIPS-Linux NPTL fix
Daniel Jacobowitz
drow@false.org
Sun Jan 29 15:37:00 GMT 2006
On Sat, Sep 10, 2005 at 11:44:28PM +0200, Lior Balkohen wrote:
> apply ok?
>
> 2005-09-10 Lior Balkohen <balkohen@gmail.com>
>
> * nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h (FUTEX_WAKE_OP,
> FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
> (lll_futex_wake_unlock): Define.
Ping?
This obvious fix is the first of several patches I need for MIPS64 NPTL.
> --- glibc.old/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h 2005-03-28 11:21:52.000000000 +0200
> +++ glibc/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h 2005-09-10 22:51:11.000000000 +0200
> @@ -30,6 +30,8 @@
> #define FUTEX_WAKE 1
> #define FUTEX_REQUEUE 3
> #define FUTEX_CMP_REQUEUE 4
> +#define FUTEX_WAKE_OP 5
> +#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
>
> /* Initializer for compatibility lock. */
> #define LLL_MUTEX_LOCK_INITIALIZER (0)
> @@ -72,6 +74,18 @@
> INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
> })
>
> +/* Returns non-zero if error happened, zero if success. */
> +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \
> + ({ \
> + INTERNAL_SYSCALL_DECL (__err); \
> + long int __ret; \
> + \
> + __ret = INTERNAL_SYSCALL (futex, __err, 6, \
> + (futexp), FUTEX_WAKE_OP, (nr_wake), \
> + (nr_wake2), (futexp2), \
> + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
> + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
> + })
>
> static inline int __attribute__((always_inline))
> __lll_mutex_trylock(int *futex)
--
Daniel Jacobowitz
CodeSourcery
More information about the Libc-alpha
mailing list