diff options
author | Dan Albert <danalbert@google.com> | 2014-06-18 09:41:33 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-06-18 13:19:22 -0700 |
commit | 11f715c62ee1464065560a2b78f0c20995e17e3b (patch) | |
tree | 7c6c6da9f06016f8423eb1bbdffe4aeff97d1734 /libc/stdlib | |
parent | ef82c28db63c6f333edb7e9d7e7ad1baa656343c (diff) | |
download | bionic-11f715c62ee1464065560a2b78f0c20995e17e3b.zip bionic-11f715c62ee1464065560a2b78f0c20995e17e3b.tar.gz bionic-11f715c62ee1464065560a2b78f0c20995e17e3b.tar.bz2 |
Hide __atexit and remove __atexit_invalid.
Bug: 11156955
Change-Id: I8c72edee8ecb92b75a282384277253bae19f7455
Diffstat (limited to 'libc/stdlib')
-rw-r--r-- | libc/stdlib/atexit.c | 5 | ||||
-rw-r--r-- | libc/stdlib/atexit.h | 3 |
2 files changed, 1 insertions, 7 deletions
diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c index c607206..05f2faa 100644 --- a/libc/stdlib/atexit.c +++ b/libc/stdlib/atexit.c @@ -37,7 +37,6 @@ #include "atexit.h" #include "private/thread_private.h" -int __atexit_invalid = 1; struct atexit *__atexit; /* @@ -131,8 +130,6 @@ __cxa_atexit(void (*func)(void *), void *arg, void *dso) sizeof(p->fns[0]); p->next = __atexit; __atexit = p; - if (__atexit_invalid) - __atexit_invalid = 0; } fnp = &p->fns[p->ind++]; fnp->cxa_func = func; @@ -159,8 +156,6 @@ __cxa_finalize(void *dso) int n, pgsize = getpagesize(), original_ind; static int call_depth; - if (__atexit_invalid) - return; _ATEXIT_LOCK(); call_depth++; diff --git a/libc/stdlib/atexit.h b/libc/stdlib/atexit.h index 2e88ad6..b530ade 100644 --- a/libc/stdlib/atexit.h +++ b/libc/stdlib/atexit.h @@ -45,8 +45,7 @@ struct atexit { __BEGIN_DECLS -extern int __atexit_invalid; -extern struct atexit *__atexit; /* points to head of LIFO stack */ +__LIBC_HIDDEN__ extern struct atexit *__atexit; /* points to head of LIFO stack */ int __cxa_atexit(void (*)(void *), void *, void *); void __cxa_finalize(void *); |