This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Use LP_OP(cmp) on NWAITERS


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]