[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r6387 - in /fsf/trunk/ports: ./ sysdeps/unix/sysv/linux/hppa/bits/ sysdeps/unix/sysv/linux/hppa/nptl/
- To: commits@xxxxxxxxxx
- Subject: [commits] r6387 - in /fsf/trunk/ports: ./ sysdeps/unix/sysv/linux/hppa/bits/ sysdeps/unix/sysv/linux/hppa/nptl/
- From: eglibc@xxxxxxxxxx
- Date: Wed, 18 Jun 2008 07:05:08 -0000
Author: eglibc
Date: Wed Jun 18 00:05:08 2008
New Revision: 6387
Log:
Import glibc-ports-mainline for 2008-06-18
Modified:
fsf/trunk/ports/ChangeLog.hppa
fsf/trunk/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
Modified: fsf/trunk/ports/ChangeLog.hppa
==============================================================================
--- fsf/trunk/ports/ChangeLog.hppa (original)
+++ fsf/trunk/ports/ChangeLog.hppa Wed Jun 18 00:05:08 2008
@@ -1,3 +1,18 @@
+2008-06-17 Aurelian Jarno <aurelien@xxxxxxxxxxx>
+ Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
+
+ [BZ #6037]
+ * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Check for -11
+ (-EAGAIN) instead of 11. Loop again when the kernel
+ returns -45 (-EDEADLOCK). Add back memory clobber.
+ Do not initialize lws_ret and lws_errno.
+
+2008-06-17 Guy Martin <gmsoft@xxxxxxxxxxxx>
+
+ [BZ #5957]
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h:
+ Use shared futex in lll_wait_tid().
+
2008-05-12 Aurelien Jarno <aurelien@xxxxxxxxxxx>
[BZ #6506]
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h Wed Jun 18 00:05:08 2008
@@ -51,34 +51,41 @@
*addr = new;
return prev; */
-/* Use the kernel atomic light weight syscalls on hppa */
-#define LWS "0xb0"
-#define LWS_CAS "0"
-/* Note r31 is the link register */
-#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31"
-#define ASM_EAGAIN "11"
+/* Use the kernel atomic light weight syscalls on hppa. */
+#define _LWS "0xb0"
+#define _LWS_CAS "0"
+/* Note r31 is the link register. */
+#define _LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory"
+/* String constant for -EAGAIN. */
+#define _ASM_EAGAIN "-11"
+/* String constant for -EDEADLOCK. */
+#define _ASM_EDEADLOCK "-45"
#if __ASSUME_LWS_CAS
/* The only basic operation needed is compare and exchange. */
# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
({ \
- volatile int lws_errno = EFAULT; \
- volatile int lws_ret = 0xdeadbeef; \
+ volatile int lws_errno; \
+ volatile int lws_ret; \
asm volatile( \
"0: \n\t" \
- "copy %3, %%r26 \n\t" \
- "copy %4, %%r25 \n\t" \
- "copy %5, %%r24 \n\t" \
- "ble " LWS "(%%sr2, %%r0) \n\t" \
- "ldi " LWS_CAS ", %%r20 \n\t" \
- "cmpib,=,n " ASM_EAGAIN ",%%r21,0b \n\t" \
+ "copy %2, %%r26 \n\t" \
+ "copy %3, %%r25 \n\t" \
+ "copy %4, %%r24 \n\t" \
+ "ble " _LWS "(%%sr2, %%r0) \n\t" \
+ "ldi " _LWS_CAS ", %%r20 \n\t" \
+ "ldi " _ASM_EAGAIN ", %%r24 \n\t" \
+ "cmpb,=,n %%r24, %%r21, 0b \n\t" \
+ "nop \n\t" \
+ "ldi " _ASM_EDEADLOCK ", %%r25 \n\t" \
+ "cmpb,=,n %%r25, %%r21, 0b \n\t" \
"nop \n\t" \
"stw %%r28, %0 \n\t" \
"sub %%r0, %%r21, %%r21 \n\t" \
"stw %%r21, %1 \n\t" \
- : "=m" (lws_ret), "=m" (lws_errno), "+m" (*mem) \
+ : "=m" (lws_ret), "=m" (lws_errno) \
: "r" (mem), "r" (oldval), "r" (newval) \
- : LWS_CLOBBER \
+ : _LWS_CLOBBER \
); \
\
if(lws_errno == EFAULT || lws_errno == ENOSYS) \
@@ -91,7 +98,7 @@
({ \
int ret; \
ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \
- /* Return 1 if it was already acquired */ \
+ /* Return 1 if it was already acquired. */ \
(ret != oldval); \
})
#else
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h Wed Jun 18 00:05:08 2008
@@ -325,12 +325,12 @@
thread ID while the clone is running and is reset to zero
afterwards. */
#define lll_wait_tid(tid) \
- do \
- { \
- __typeof (tid) __tid; \
- while ((__tid = (tid)) != 0) \
- lll_futex_wait (&(tid), __tid, 0); \
- } \
+ do \
+ { \
+ __typeof (tid) __tid; \
+ while ((__tid = (tid)) != 0) \
+ lll_futex_wait (&(tid), __tid, LLL_SHARED); \
+ } \
while (0)
extern int __lll_timedwait_tid (int *, const struct timespec *)