aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-10-18 19:26:30 +0000
committerUlrich Drepper <drepper@redhat.com>2006-10-18 19:26:30 +0000
commit609cf61467154868c88b1ede078322fb4b48a528 (patch)
tree4034dfeb635a3f4fb133314a370f653578a7331a /sysdeps/x86_64
parent4a85a8ee31c357ce499529ca76136cce0b6773e9 (diff)
downloadglibc-609cf61467154868c88b1ede078322fb4b48a528.zip
glibc-609cf61467154868c88b1ede078322fb4b48a528.tar.gz
glibc-609cf61467154868c88b1ede078322fb4b48a528.tar.bz2
[BZ #3313]
2006-10-17 Jakub Jelinek <jakub@redhat.com> * sunrpc/xdr_mem.c (xdrmem_setpos): Don't compare addresses as signed longs, check for x_base + pos overflow. * sunrpc/Makefile (tests): Add tst-xdrmem2. * sunrpc/tst-xdrmem2.c: New test. 2006-10-18 Ulrich Drepper <drepper@redhat.com> * elf/dl-lookup.c (_dl_lookup_symbol_x): Add warning to _dl_lookup_symbol_x code. 2006-10-17 Jakub Jelinek <jakub@redhat.com> * elf/dl-runtime.c: Include sysdep-cancel.h. (_dl_fixup, _dl_profile_fixup): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-sym.c: Include sysdep-cancel.h. (do_sym): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-close.c: Include sysdep-cancel.h. (_dl_close): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-open.c: Include sysdep-cancel.h. (dl_open_worker): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. 2006-10-17 Jakub Jelinek <jakub@redhat.com> [BZ #3313] * malloc/malloc.c (malloc_consolidate): Set maxfb to address of last fastbin rather than end of fastbin array. 2006-10-18 Ulrich Drepper <drepper@redhat.com> * sysdeps/i386/i486/bits/atomic.h (catomic_decrement): Use correct body macro. * sysdeps/x86_64/bits/atomic.h (__arch_c_compare_and_exchange_val_64_acq): Add missing casts. (catomic_decrement): Use correct body macro. 2006-10-17 Jakub Jelinek <jakub@redhat.com> * include/atomic.h: Add a unique prefix to all local variables in macros. * csu/tst-atomic.c (do_test): Test also catomic_* macros. * include/link.h: Include <rtld-lowlevel.h>. Define struct
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/bits/atomic.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/sysdeps/x86_64/bits/atomic.h b/sysdeps/x86_64/bits/atomic.h
index e1981e9..65d6b02 100644
--- a/sysdeps/x86_64/bits/atomic.h
+++ b/sysdeps/x86_64/bits/atomic.h
@@ -81,8 +81,8 @@ typedef uintmax_t uatomic_max_t;
({ __typeof (*mem) ret; \
__asm __volatile (LOCK_PREFIX "cmpxchgq %q2, %1" \
: "=a" (ret), "=m" (*mem) \
- : "r" ((long) (newval)), "m" (*mem), \
- "0" ((long) (oldval))); \
+ : "r" ((long int) (newval)), "m" (*mem), \
+ "0" ((long int) (oldval))); \
ret; })
@@ -121,12 +121,13 @@ typedef uintmax_t uatomic_max_t;
#define __arch_c_compare_and_exchange_val_64_acq(mem, newval, oldval) \
({ __typeof (*mem) ret; \
- __asm __volatile ("cmpl $0, %%fs:%P5\n\t" \
- "je 0f\n\t" \
- "lock\n" \
+ __asm __volatile ("cmpl $0, %%fs:%P5\n\t" \
+ "je 0f\n\t" \
+ "lock\n" \
"0:\tcmpxchgq %q2, %1" \
: "=a" (ret), "=m" (*mem) \
- : "q" (newval), "m" (*mem), "0" (oldval), \
+ : "q" ((long int) (newval)), "m" (*mem), \
+ "0" ((long int)oldval), \
"i" (offsetof (tcbhead_t, multiple_threads))); \
ret; })
@@ -351,7 +352,7 @@ typedef uintmax_t uatomic_max_t;
"cmpl $0, %%fs:%P2\n\tje 0f\n\tlock\n0:\t"
#define catomic_decrement(mem) \
- __arch_increment_body (__arch_decrement_cprefix, mem)
+ __arch_decrement_body (__arch_decrement_cprefix, mem)
#define atomic_decrement_and_test(mem) \