summaryrefslogtreecommitdiff
path: root/libc/nptl
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-12-02 21:11:45 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-12-02 21:11:45 +0000
commit94c459cc7a611211d10773eef526826a8da80456 (patch)
tree68526f35a4f1d891b05436e0233a85c74dcc7eff /libc/nptl
parent2b19f7c91f9f7c2a7c585cc62b5f3fe75bece1b7 (diff)
Merge changes between r21775 and r21911 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@21912 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/nptl')
-rw-r--r--libc/nptl/ChangeLog21
-rw-r--r--libc/nptl/pthread_cond_timedwait.c9
-rw-r--r--libc/nptl/sysdeps/i386/tls.h5
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/sem_post.c2
-rw-r--r--libc/nptl/sysdeps/x86_64/tls.h5
-rw-r--r--libc/nptl/unwind.c2
6 files changed, 33 insertions, 11 deletions
diff --git a/libc/nptl/ChangeLog b/libc/nptl/ChangeLog
index 48aa6da1a..a9b00e7c7 100644
--- a/libc/nptl/ChangeLog
+++ b/libc/nptl/ChangeLog
@@ -1,3 +1,24 @@
+2012-11-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
+ to THREAD_SETMEM.
+ * sysdeps/i386/tls.h: Include <libc-internal.h>.
+ (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
+ (THREAD_SETMEM_NC): Likewise.
+ * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
+ (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
+ (THREAD_SETMEM_NC): Likewise.
+
+2012-11-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
+ of atomic_increment_val to (void) instead of storing in
+ otherwise-unused variable.
+
+ * pthread_cond_timedwait.c (__pthread_cond_timedwait)
+ [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
+ instead of storing in otherwise-unused variable.
+
2012-11-14 Marcus Shawcroft <marcus.shawcroft@linaro.org>
* Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
diff --git a/libc/nptl/pthread_cond_timedwait.c b/libc/nptl/pthread_cond_timedwait.c
index 2fcbc57c2..ef33b966b 100644
--- a/libc/nptl/pthread_cond_timedwait.c
+++ b/libc/nptl/pthread_cond_timedwait.c
@@ -115,11 +115,10 @@ __pthread_cond_timedwait (cond, mutex, abstime)
{
# ifdef __NR_clock_gettime
INTERNAL_SYSCALL_DECL (err);
- int ret;
- ret = INTERNAL_VSYSCALL (clock_gettime, err, 2,
- (cond->__data.__nwaiters
- & ((1 << COND_NWAITERS_SHIFT) - 1)),
- &rt);
+ (void) INTERNAL_VSYSCALL (clock_gettime, err, 2,
+ (cond->__data.__nwaiters
+ & ((1 << COND_NWAITERS_SHIFT) - 1)),
+ &rt);
/* Convert the absolute timeout value to a relative timeout. */
rt.tv_sec = abstime->tv_sec - rt.tv_sec;
rt.tv_nsec = abstime->tv_nsec - rt.tv_nsec;
diff --git a/libc/nptl/sysdeps/i386/tls.h b/libc/nptl/sysdeps/i386/tls.h
index eb1ca312f..90c7a534b 100644
--- a/libc/nptl/sysdeps/i386/tls.h
+++ b/libc/nptl/sysdeps/i386/tls.h
@@ -26,6 +26,7 @@
# include <stdint.h>
# include <stdlib.h>
# include <sysdep.h>
+# include <libc-internal.h>
# include <kernel-features.h>
@@ -343,7 +344,7 @@ union user_desc_init
\
asm volatile ("movl %%eax,%%gs:%P1\n\t" \
"movl %%edx,%%gs:%P2" : \
- : "A" ((uint64_t) (value)), \
+ : "A" ((uint64_t) cast_to_integer (value)), \
"i" (offsetof (struct pthread, member)), \
"i" (offsetof (struct pthread, member) + 4)); \
}})
@@ -370,7 +371,7 @@ union user_desc_init
\
asm volatile ("movl %%eax,%%gs:%P1(,%2,8)\n\t" \
"movl %%edx,%%gs:4+%P1(,%2,8)" : \
- : "A" ((uint64_t) (value)), \
+ : "A" ((uint64_t) cast_to_integer (value)), \
"i" (offsetof (struct pthread, member)), \
"r" (idx)); \
}})
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/sem_post.c b/libc/nptl/sysdeps/unix/sysv/linux/sem_post.c
index 67e8cc542..429d1932f 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/sem_post.c
+++ b/libc/nptl/sysdeps/unix/sysv/linux/sem_post.c
@@ -65,7 +65,7 @@ __old_sem_post (sem_t *sem)
{
int *futex = (int *) sem;
- int nr = atomic_increment_val (futex);
+ (void) atomic_increment_val (futex);
/* We always have to assume it is a shared semaphore. */
int err = lll_futex_wake (futex, 1, LLL_SHARED);
if (__builtin_expect (err, 0) < 0)
diff --git a/libc/nptl/sysdeps/x86_64/tls.h b/libc/nptl/sysdeps/x86_64/tls.h
index bc60a511f..f3b76495b 100644
--- a/libc/nptl/sysdeps/x86_64/tls.h
+++ b/libc/nptl/sysdeps/x86_64/tls.h
@@ -26,6 +26,7 @@
# include <stdint.h>
# include <stdlib.h>
# include <sysdep.h>
+# include <libc-internal.h>
# include <kernel-features.h>
/* Replacement type for __m128 since this file is included by ld.so,
@@ -263,7 +264,7 @@ typedef struct
abort (); \
\
asm volatile ("movq %q0,%%fs:%P1" : \
- : IMM_MODE ((uint64_t) (value)), \
+ : IMM_MODE ((uint64_t) cast_to_integer (value)), \
"i" (offsetof (struct pthread, member))); \
}})
@@ -288,7 +289,7 @@ typedef struct
abort (); \
\
asm volatile ("movq %q0,%%fs:%P1(,%q2,8)" : \
- : IMM_MODE ((uint64_t) (value)), \
+ : IMM_MODE ((uint64_t) cast_to_integer (value)), \
"i" (offsetof (struct pthread, member[0])), \
"r" (idx)); \
}})
diff --git a/libc/nptl/unwind.c b/libc/nptl/unwind.c
index 7ccb21382..aedd03745 100644
--- a/libc/nptl/unwind.c
+++ b/libc/nptl/unwind.c
@@ -124,7 +124,7 @@ __pthread_unwind (__pthread_unwind_buf_t *buf)
/* This is not a catchable exception, so don't provide any details about
the exception type. We do need to initialize the field though. */
THREAD_SETMEM (self, exc.exception_class, 0);
- THREAD_SETMEM (self, exc.exception_cleanup, unwind_cleanup);
+ THREAD_SETMEM (self, exc.exception_cleanup, &unwind_cleanup);
_Unwind_ForcedUnwind (&self->exc, unwind_stop, ibuf);
#else