From 2eba43d0c1c78cf2d13b896bb9a608c482a585df Mon Sep 17 00:00:00 2001 From: guenther <> Date: Sat, 16 Dec 2017 20:06:56 +0000 Subject: 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@ --- src/lib/libc/stdlib/atexit.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/lib/libc/stdlib/atexit.h') 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 @@ -/* $OpenBSD: atexit.h,v 1.11 2017/12/05 13:45:31 kettenis Exp $ */ +/* $OpenBSD: atexit.h,v 1.12 2017/12/16 20:06:56 guenther Exp $ */ /* * Copyright (c) 2002 Daniel Hartmeier @@ -41,6 +41,13 @@ struct atexit { } fns[1]; /* the table itself */ }; +/* a chain of these are hung off each thread's TIB's tib_atexit member */ +struct thread_atexit_fn { + void (*func)(void *); + void *arg; + struct thread_atexit_fn *next; +}; + __BEGIN_HIDDEN_DECLS extern struct atexit *__atexit; /* points to head of LIFO stack */ __END_HIDDEN_DECLS -- cgit v1.2.3-55-g6feb