This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Use LP_OP(cmp) on NWAITERS
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 15 May 2012 09:42:44 -0700
- Subject: PATCH: Use LP_OP(cmp) on NWAITERS
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
NWAITERS is nwaiters in:
/* Semaphore variable structure. */
struct new_sem
{
unsigned int value;
int private;
unsigned long int nwaiters;
};
This patch use LP_OP(cmp) on NWAITERS. Tested on Linux/x86-64. OK
to install?
Thanks.
H.J.
--
* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
NWAITERS, which is unsigned long int.
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S
index 0e0898c..65e715d 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S
@@ -45,7 +45,7 @@ sem_post:
#endif
jnz 0b
- cmpq $0, NWAITERS(%rdi)
+ LP_OP(cmp) $0, NWAITERS(%rdi)
je 2f
movl $SYS_futex, %eax