This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] sysdeps/generic/dl-fptr.c, default CAS parameter order wrong.
- From: Carlos O'Donell <carlos at baldric dot uwo dot ca>
- To: libc-alpha <libc-alpha at sources dot redhat dot com>
- Date: Thu, 11 Dec 2003 16:43:33 -0500
- Subject: [PATCH] sysdeps/generic/dl-fptr.c, default CAS parameter order wrong.
libc-alpha,
Porting hppa over to use the generic function descriptor code.
Noticed a small mistake in the CAS define. I'm assuming that
include/atomic.h is correct and that CAS here was defined to match the
version that ia64 has defined. So I'm swapping the order so that
atomic_compare_and_exchange_bool_acq sees the right values.
Cheers,
Carlos.
2003-12-11 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/generic/dl-fptr.c [COMPARE_AND_SWAP]: Pass new and old
in the right order.
Index: sysdeps/generic/dl-fptr.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/dl-fptr.c,v
retrieving revision 1.5
diff -u -p -r1.5 dl-fptr.c
--- sysdeps/generic/dl-fptr.c 2 May 2003 22:37:14 -0000 1.5
+++ sysdeps/generic/dl-fptr.c 11 Dec 2003 21:44:15 -0000
@@ -40,7 +40,7 @@
#ifndef COMPARE_AND_SWAP
#define COMPARE_AND_SWAP(ptr,old,new) \
- atomic_compare_and_exchange_bool_acq ((ptr), (old), (new))
+ atomic_compare_and_exchange_bool_acq ((ptr), (new), (old))
#endif
ElfW(Addr) _dl_boot_fptr_table [ELF_MACHINE_BOOT_FPTR_TABLE_LEN];