diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-12-19 12:11:38 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-12-19 12:11:38 +0000 |
commit | 2c6cfe6853a30deb4af842aacc924fa298d0521a (patch) | |
tree | 7fcc409e499bb8e3d96522f7fc2393fc10e53db2 /stdlib/cxa_atexit.c | |
parent | 3ccb96cd41b38d0159bdf8aad229c3599864c65d (diff) |
Updated to fedora-glibc-20051219T1003cvs/fedora-glibc-2_3_90-19
Diffstat (limited to 'stdlib/cxa_atexit.c')
-rw-r--r-- | stdlib/cxa_atexit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/stdlib/cxa_atexit.c b/stdlib/cxa_atexit.c index 490776105f..9b7a932b85 100644 --- a/stdlib/cxa_atexit.c +++ b/stdlib/cxa_atexit.c @@ -21,6 +21,8 @@ #include <bits/libc-lock.h> #include "exit.h" +#include <atomic.h> +#include <sysdep.h> #undef __cxa_atexit @@ -35,10 +37,14 @@ __cxa_atexit (void (*func) (void *), void *arg, void *d) if (new == NULL) return -1; - new->flavor = ef_cxa; +#ifdef PTR_MANGLE + PTR_MANGLE (func); +#endif new->func.cxa.fn = (void (*) (void *, int)) func; new->func.cxa.arg = arg; new->func.cxa.dso_handle = d; + atomic_write_barrier (); + new->flavor = ef_cxa; return 0; } INTDEF(__cxa_atexit) |