diff options
author | John Birrell <jb@FreeBSD.org> | 1998-04-29 09:08:43 +0000 |
---|---|---|
committer | John Birrell <jb@FreeBSD.org> | 1998-04-29 09:08:43 +0000 |
commit | 96c76d66dbe7eb660f3d27ca616d2f9d91dbaae6 (patch) | |
tree | 479f65a5b078bbe64f9692ea7ae8986c83f047d4 | |
parent | 7317e6b1fd8229f2e0923a9994b951f8a691d849 (diff) |
Notes
-rw-r--r-- | lib/libc/stdlib/exit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/stdlib/exit.c b/lib/libc/stdlib/exit.c index 5df19dc1bd4a3..b0f6d3a518828 100644 --- a/lib/libc/stdlib/exit.c +++ b/lib/libc/stdlib/exit.c @@ -60,6 +60,12 @@ exit(status) register struct atexit *p; register int n; +#ifdef _THREAD_SAFE + extern int _thread_autoinit_dummy_decl; + /* Ensure that the auto-initialization routine is linked in: */ + _thread_autoinit_dummy_decl = 1; +#endif + for (p = __atexit; p; p = p->next) for (n = p->ind; --n >= 0;) (*p->fns[n])(); |