summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/atexit.h
diff options
context:
space:
mode:
authorguenther <>2017-12-16 20:06:56 +0000
committerguenther <>2017-12-16 20:06:56 +0000
commit2eba43d0c1c78cf2d13b896bb9a608c482a585df (patch)
tree2fa5dfadabf13e01a2eeaa103c96c8e3c59c40c9 /src/lib/libc/stdlib/atexit.h
parentcfcd6a9a82fccae3c7538bacdf933acc3f90fea2 (diff)
downloadopenbsd-2eba43d0c1c78cf2d13b896bb9a608c482a585df.tar.gz
openbsd-2eba43d0c1c78cf2d13b896bb9a608c482a585df.tar.bz2
openbsd-2eba43d0c1c78cf2d13b896bb9a608c482a585df.zip
Move __cxa_thread_atexit* to its own .c file to avoid pulling the code
(w/ _dlctl reference) into static executables. It's all Mark's code so put his preferred copyright on it. ok kettenis@
Diffstat (limited to 'src/lib/libc/stdlib/atexit.h')
-rw-r--r--src/lib/libc/stdlib/atexit.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/atexit.h b/src/lib/libc/stdlib/atexit.h
index d9bfed852f..f2fa7bd83f 100644
--- a/src/lib/libc/stdlib/atexit.h
+++ b/src/lib/libc/stdlib/atexit.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: atexit.h,v 1.11 2017/12/05 13:45:31 kettenis Exp $ */ 1/* $OpenBSD: atexit.h,v 1.12 2017/12/16 20:06:56 guenther Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2002 Daniel Hartmeier 4 * Copyright (c) 2002 Daniel Hartmeier
@@ -41,6 +41,13 @@ struct atexit {
41 } fns[1]; /* the table itself */ 41 } fns[1]; /* the table itself */
42}; 42};
43 43
44/* a chain of these are hung off each thread's TIB's tib_atexit member */
45struct thread_atexit_fn {
46 void (*func)(void *);
47 void *arg;
48 struct thread_atexit_fn *next;
49};
50
44__BEGIN_HIDDEN_DECLS 51__BEGIN_HIDDEN_DECLS
45extern struct atexit *__atexit; /* points to head of LIFO stack */ 52extern struct atexit *__atexit; /* points to head of LIFO stack */
46__END_HIDDEN_DECLS 53__END_HIDDEN_DECLS