am 49d5399b: Merge "Hide __atexit and remove __atexit_invalid."
* commit '49d5399bbcfae80d8b21f2303077b24257a1b966': Hide __atexit and remove __atexit_invalid.
This commit is contained in:
commit
9ac8064554
@ -37,7 +37,6 @@
|
|||||||
#include "atexit.h"
|
#include "atexit.h"
|
||||||
#include "private/thread_private.h"
|
#include "private/thread_private.h"
|
||||||
|
|
||||||
int __atexit_invalid = 1;
|
|
||||||
struct atexit *__atexit;
|
struct atexit *__atexit;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -131,8 +130,6 @@ __cxa_atexit(void (*func)(void *), void *arg, void *dso)
|
|||||||
sizeof(p->fns[0]);
|
sizeof(p->fns[0]);
|
||||||
p->next = __atexit;
|
p->next = __atexit;
|
||||||
__atexit = p;
|
__atexit = p;
|
||||||
if (__atexit_invalid)
|
|
||||||
__atexit_invalid = 0;
|
|
||||||
}
|
}
|
||||||
fnp = &p->fns[p->ind++];
|
fnp = &p->fns[p->ind++];
|
||||||
fnp->cxa_func = func;
|
fnp->cxa_func = func;
|
||||||
@ -159,8 +156,6 @@ __cxa_finalize(void *dso)
|
|||||||
int n, pgsize = getpagesize(), original_ind;
|
int n, pgsize = getpagesize(), original_ind;
|
||||||
static int call_depth;
|
static int call_depth;
|
||||||
|
|
||||||
if (__atexit_invalid)
|
|
||||||
return;
|
|
||||||
_ATEXIT_LOCK();
|
_ATEXIT_LOCK();
|
||||||
call_depth++;
|
call_depth++;
|
||||||
|
|
||||||
|
@ -45,8 +45,7 @@ struct atexit {
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
extern int __atexit_invalid;
|
__LIBC_HIDDEN__ extern struct atexit *__atexit; /* points to head of LIFO stack */
|
||||||
extern struct atexit *__atexit; /* points to head of LIFO stack */
|
|
||||||
|
|
||||||
int __cxa_atexit(void (*)(void *), void *, void *);
|
int __cxa_atexit(void (*)(void *), void *, void *);
|
||||||
void __cxa_finalize(void *);
|
void __cxa_finalize(void *);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user