Upstream atexit

Change-Id: Ia454a2181b5058ed9783dc02b6b1805d0e4d2715
This commit is contained in:
Dmitriy Ivanov
2014-07-11 12:59:16 -07:00
parent 83ce99d8b7
commit 53c3c271dc
10 changed files with 68 additions and 142 deletions

View File

@@ -46,7 +46,6 @@
#include <sys/auxv.h>
#include <sys/mman.h>
#include "atexit.h"
#include "libc_init_common.h"
#include "pthread_internal.h"
@@ -60,6 +59,8 @@
// itself at the start of a page.
#define PAGE_END(x) PAGE_START((x) + (PAGE_SIZE-1))
extern "C" int __cxa_atexit(void (*)(void *), void *, void *);
static void call_array(void(**list)()) {
// First element is -1, list is null-terminated
while (*++list) {