This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch gentoo/2.19 updated. glibc-2.19-20-g9559080
- From: vapier at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 11 Aug 2014 13:48:58 -0000
- Subject: GNU C Library master sources branch gentoo/2.19 updated. glibc-2.19-20-g9559080
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, gentoo/2.19 has been updated
via 9559080132dcd991176e5eb48604405e610534d1 (commit)
via 7aaf74a47f7a851329eda4c1e39c9074e2e9e18f (commit)
via bb18aaeae7ba7f46ac2897889ee92b3f551fc0b4 (commit)
via c2934dc5e03bc0369b76d0b1209aea9323345ff8 (commit)
via 8e9c9f8f712392fc9c9c3abee93d2ac8bcac6c6e (commit)
via fcf3bc5b09f1a97943999360921f9be730c2116d (commit)
from 4545280f9c1ab06efa9348ab46bac436f5885244 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9559080132dcd991176e5eb48604405e610534d1
commit 9559080132dcd991176e5eb48604405e610534d1
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sun Aug 10 10:01:43 2014 -0400
nptl: handle EAGAIN with some futex operations
diff --git a/nptl/sysdeps/pthread/aio_misc.h b/nptl/sysdeps/pthread/aio_misc.h
index ac3488c..ac35771 100644
--- a/nptl/sysdeps/pthread/aio_misc.h
+++ b/nptl/sysdeps/pthread/aio_misc.h
@@ -50,7 +50,7 @@
{ \
status = lll_futex_timed_wait (futexaddr, oldval, timeout, \
LLL_PRIVATE); \
- if (status != -EWOULDBLOCK) \
+ if (status != -EWOULDBLOCK && status != -EAGAIN) \
break; \
\
oldval = *futexaddr; \
@@ -65,7 +65,7 @@
else if (status == -ETIMEDOUT) \
result = EAGAIN; \
else \
- assert (status == 0 || status == -EWOULDBLOCK); \
+ assert (status == 0 || status == -EWOULDBLOCK || status == -EAGAIN);\
\
pthread_mutex_lock (&__aio_requests_mutex); \
} \
diff --git a/nptl/sysdeps/pthread/gai_misc.h b/nptl/sysdeps/pthread/gai_misc.h
index 946275e..aa72c4a 100644
--- a/nptl/sysdeps/pthread/gai_misc.h
+++ b/nptl/sysdeps/pthread/gai_misc.h
@@ -51,7 +51,7 @@
{ \
status = lll_futex_timed_wait (futexaddr, oldval, timeout, \
LLL_PRIVATE); \
- if (status != -EWOULDBLOCK) \
+ if (status != -EWOULDBLOCK && status != -EAGAIN) \
break; \
\
oldval = *futexaddr; \
@@ -66,7 +66,7 @@
else if (status == -ETIMEDOUT) \
result = EAGAIN; \
else \
- assert (status == 0 || status == -EWOULDBLOCK); \
+ assert (status == 0 || status == -EWOULDBLOCK || status == -EAGAIN);\
\
pthread_mutex_lock (&__gai_requests_mutex); \
} \
diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
index 1b6a20b..41ac54b 100644
--- a/sunrpc/clnt_udp.c
+++ b/sunrpc/clnt_udp.c
@@ -463,7 +463,7 @@ send_again:
while (inlen < 0 && errno == EINTR);
if (inlen < 0)
{
- if (errno == EWOULDBLOCK)
+ if (errno == EWOULDBLOCK || errno == EAGAIN)
continue;
cu->cu_error.re_errno = errno;
return (cu->cu_error.re_status = RPC_CANTRECV);
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7aaf74a47f7a851329eda4c1e39c9074e2e9e18f
commit 7aaf74a47f7a851329eda4c1e39c9074e2e9e18f
Author: John David Anglin <dave.anglin@bell.net>
Date: Sun Aug 10 10:00:23 2014 -0400
hppa: fix __O_SYNC to match the kernel
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index f596d5f..24b564c 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -27,7 +27,7 @@
#define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */
#define __O_DSYNC 01000000
#define __O_RSYNC 02000000 /* HPUX only */
-#define __O_SYNC 01000000
+#define __O_SYNC 00100000
#define O_SYNC (__O_SYNC|__O_DSYNC)
#define O_BLKSEEK 00000100 /* HPUX only */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bb18aaeae7ba7f46ac2897889ee92b3f551fc0b4
commit bb18aaeae7ba7f46ac2897889ee92b3f551fc0b4
Author: John David Anglin <dave.anglin@bell.net>
Date: Sun Aug 10 09:54:53 2014 -0400
hppa: fix pthread spinlock
diff --git a/ports/sysdeps/hppa/nptl/pthread_spin_init.c b/ports/sysdeps/hppa/nptl/pthread_spin_init.c
index c83669e..b0ff789 100644
--- a/ports/sysdeps/hppa/nptl/pthread_spin_init.c
+++ b/ports/sysdeps/hppa/nptl/pthread_spin_init.c
@@ -20,9 +20,9 @@
int
pthread_spin_init (pthread_spinlock_t *lock, int pshared)
{
- int tmp = 0;
- /* This should be a memory barrier to newer compilers */
- __asm__ __volatile__ ("stw,ma %1,0(%0)"
- : : "r" (lock), "r" (tmp) : "memory");
+ /* The LWS-CAS operation on hppa is a synthetic atomic operation
+ that doesn't provide the type of coherency that we need. Therefore
+ we force that coherency by using LWS-CAS again. */
+ atomic_exchange_rel (lock, 0);
return 0;
}
diff --git a/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c b/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c
index 5a8aed8..7a4a996 100644
--- a/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c
+++ b/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c
@@ -20,9 +20,9 @@
int
pthread_spin_unlock (pthread_spinlock_t *lock)
{
- int tmp = 0;
- /* This should be a memory barrier to newer compilers */
- __asm__ __volatile__ ("stw,ma %1,0(%0)"
- : : "r" (lock), "r" (tmp) : "memory");
+ /* The LWS-CAS operation on hppa is a synthetic atomic operation
+ that doesn't provide the type of coherency that we need. Therefore
+ we force that coherency by using LWS-CAS again. */
+ atomic_exchange_rel (lock, 0);
return 0;
}
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c2934dc5e03bc0369b76d0b1209aea9323345ff8
commit c2934dc5e03bc0369b76d0b1209aea9323345ff8
Author: John David Anglin <dave.anglin@bell.net>
Date: Sun Aug 10 09:41:27 2014 -0400
hppa: fix bug in floating point exception support
diff --git a/ports/sysdeps/hppa/fpu/feholdexcpt.c b/ports/sysdeps/hppa/fpu/feholdexcpt.c
index b121387..2dda85f 100644
--- a/ports/sysdeps/hppa/fpu/feholdexcpt.c
+++ b/ports/sysdeps/hppa/fpu/feholdexcpt.c
@@ -29,8 +29,8 @@ feholdexcept (fenv_t *envp)
/* Store the environment. */
bufptr = clear.buf;
__asm__ (
- "fstd,ma %%fr0,8(%1)\n"
- : "=m" (clear), "+r" (bufptr) : : "%r0");
+ "fstd %%fr0,0(%1)\n"
+ : "=m" (clear) : "r" (bufptr) : "%r0");
memcpy (envp, &clear.env, sizeof (fenv_t));
/* Clear exception queues */
@@ -44,7 +44,7 @@ feholdexcept (fenv_t *envp)
Thus we start bufptr at the end and work backwards */
bufptr = (unsigned long long *)((unsigned int)(clear.buf) + sizeof(unsigned int)*4);
__asm__ (
- "fldd,mb -8(%0),%%fr0\n"
+ "fldd 0(%0),%%fr0\n"
: : "r" (bufptr), "m" (clear) : "%r0");
return 0;
diff --git a/ports/sysdeps/hppa/fpu/fesetenv.c b/ports/sysdeps/hppa/fpu/fesetenv.c
index c967bd5..6ebceef 100644
--- a/ports/sysdeps/hppa/fpu/fesetenv.c
+++ b/ports/sysdeps/hppa/fpu/fesetenv.c
@@ -33,7 +33,7 @@ fesetenv (const fenv_t *envp)
we want to use from the environment specified by the parameter. */
bufptr = temp.buf;
__asm__ (
- "fstd,ma %%fr0,8(%1)\n"
+ "fstd %%fr0,0(%1)\n"
: "=m" (temp) : "r" (bufptr) : "%r0");
temp.env.__status_word &= ~(FE_ALL_EXCEPT
@@ -54,7 +54,7 @@ fesetenv (const fenv_t *envp)
we take advantage of that to load in reverse order so fr0
is loaded last and T-Bit is enabled. */
__asm__ (
- "fldd,mb -8(%1),%%fr0\n"
+ "fldd 0(%1),%%fr0\n"
: : "m" (temp), "r" (bufptr) : "%r0" );
/* Success. */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8e9c9f8f712392fc9c9c3abee93d2ac8bcac6c6e
commit 8e9c9f8f712392fc9c9c3abee93d2ac8bcac6c6e
Author: John David Anglin <dave.anglin@bell.net>
Date: Sun Aug 10 09:39:25 2014 -0400
hppa: fix build problems with atomic code
Specifically:
../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h:68:6: error:
canâ??t find a register in class â??R1_REGSâ?? while reloading â??asmâ??
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
index 76ca0b1..06fa9af 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
@@ -61,42 +61,46 @@ typedef uintmax_t uatomic_max_t;
#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; \
- volatile int lws_ret; \
- asm volatile( \
- "0: \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" \
- "stw %%r21, %1 \n\t" \
- : "=m" (lws_ret), "=m" (lws_errno) \
- : "r" (mem), "r" (oldval), "r" (newval) \
- : _LWS_CLOBBER \
- ); \
- \
- if(lws_errno == -EFAULT || lws_errno == -ENOSYS) \
- ABORT_INSTRUCTION; \
- \
- lws_ret; \
- })
+static int __attribute__((noinline))
+__atomic_compare_and_exchange_val_acq (int mem, int newval, int oldval)
+{
+ volatile int lws_errno;
+ volatile int lws_ret;
+ asm volatile(
+ "0: \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"
+ "stw %%r21, %1 \n\t"
+ : "=m" (lws_ret), "=m" (lws_errno)
+ : "r" (mem), "r" (oldval), "r" (newval)
+ : _LWS_CLOBBER
+ );
+
+ if (lws_errno == -EFAULT || lws_errno == -ENOSYS)
+ ABORT_INSTRUCTION;
+
+ return lws_ret;
+}
+# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
+ ((__typeof__(oldval)) \
+ __atomic_compare_and_exchange_val_acq ((int)mem, (int)newval, (int)oldval))
# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
({ \
- int ret; \
+ __typeof__(oldval) ret; \
ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \
/* Return 1 if it was already acquired. */ \
- (ret != (int)oldval); \
+ (ret != oldval); \
})
#else
# error __ASSUME_LWS_CAS is required to build glibc.
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fcf3bc5b09f1a97943999360921f9be730c2116d
commit fcf3bc5b09f1a97943999360921f9be730c2116d
Author: John David Anglin <dave.anglin@bell.net>
Date: Sun Aug 10 09:36:50 2014 -0400
hppa: name setjmp union
Some of the C++ tests want this, and this is what all other arches
have done, so do it on hppa too.
2013-07-07 John David Anglin <dave.anglin@bell.net>
* ports/sysdeps/hppa/bits/setjmp.h: Name anonymous union.
diff --git a/ports/sysdeps/hppa/bits/setjmp.h b/ports/sysdeps/hppa/bits/setjmp.h
index 9a404e7..de05899 100644
--- a/ports/sysdeps/hppa/bits/setjmp.h
+++ b/ports/sysdeps/hppa/bits/setjmp.h
@@ -38,7 +38,7 @@
* 10 x 64-bit fprs in this order:
- fr12-fr21 (callee saves)
Note: We have 8 bytes of free space for future uses. */
-typedef union
+typedef union __jmp_buf_internal
{
struct __jmp_buf_internal_tag
{
-----------------------------------------------------------------------
Summary of changes:
nptl/sysdeps/pthread/aio_misc.h | 4 +-
nptl/sysdeps/pthread/gai_misc.h | 4 +-
ports/sysdeps/hppa/bits/setjmp.h | 2 +-
ports/sysdeps/hppa/fpu/feholdexcpt.c | 6 +-
ports/sysdeps/hppa/fpu/fesetenv.c | 4 +-
ports/sysdeps/hppa/nptl/pthread_spin_init.c | 8 +-
ports/sysdeps/hppa/nptl/pthread_spin_unlock.c | 8 +-
ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 66 +++++++++++----------
ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 2 +-
sunrpc/clnt_udp.c | 2 +-
10 files changed, 55 insertions(+), 51 deletions(-)
hooks/post-receive
--
GNU C Library master sources