summaryrefslogtreecommitdiffstats
path: root/libc/stdlib
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2015-06-04 14:33:18 -0700
committerDmitriy Ivanov <dimitry@google.com>2015-06-04 14:51:26 -0700
commitc534603f8d2a03e0ace678adc83d6194a7afdbe9 (patch)
treeae3ff05250aec80158ead2bdc5fc9ffcdeb1aa69 /libc/stdlib
parentf2e86cd98038d6239265d936c32774b7289bfdc7 (diff)
downloadbionic-c534603f8d2a03e0ace678adc83d6194a7afdbe9.zip
bionic-c534603f8d2a03e0ace678adc83d6194a7afdbe9.tar.gz
bionic-c534603f8d2a03e0ace678adc83d6194a7afdbe9.tar.bz2
Hide __atexit
Bug: http://b/21640806 Change-Id: I778b35c8c7538859179e97fcf5a82db2fcd9e50f (cherry picked from commit 9cf6fc304bbbfb26911e0b624b80d862c40b0308)
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/atexit.c13
-rw-r--r--libc/stdlib/atexit.h13
2 files changed, 12 insertions, 14 deletions
diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c
index df2b1b5..a6970dd 100644
--- a/libc/stdlib/atexit.c
+++ b/libc/stdlib/atexit.c
@@ -37,7 +37,18 @@
#include "atexit.h"
#include "private/thread_private.h"
-struct atexit *__atexit;
+struct atexit {
+ struct atexit *next; /* next in list */
+ int ind; /* next index in this table */
+ int max; /* max entries >= ATEXIT_SIZE */
+ struct atexit_fn {
+ void (*fn_ptr)(void *);
+ void *fn_arg; /* argument for CXA callback */
+ void *fn_dso; /* shared module handle */
+ } fns[1]; /* the table itself */
+};
+
+static struct atexit *__atexit;
static int restartloop;
/* BEGIN android-changed: __unregister_atfork is used by __cxa_finalize */
diff --git a/libc/stdlib/atexit.h b/libc/stdlib/atexit.h
index 3de2aa3..e01bb34 100644
--- a/libc/stdlib/atexit.h
+++ b/libc/stdlib/atexit.h
@@ -30,18 +30,5 @@
*
*/
-struct atexit {
- struct atexit *next; /* next in list */
- int ind; /* next index in this table */
- int max; /* max entries >= ATEXIT_SIZE */
- struct atexit_fn {
- void (*fn_ptr)(void *);
- void *fn_arg; /* argument for CXA callback */
- void *fn_dso; /* shared module handle */
- } fns[1]; /* the table itself */
-};
-
-extern struct atexit *__atexit; /* points to head of LIFO stack */
-
int __cxa_atexit(void (*)(void *), void *, void *);
void __cxa_finalize(void *);