summaryrefslogtreecommitdiff
path: root/lib/libc/thread/rthread.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-12-05 13:45:32 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-12-05 13:45:32 +0000
commit17a2b672301685981cc6dad0e1f202c7567ccbc9 (patch)
tree3506da59cecf253bf6e29e6399c01e01a1076e90 /lib/libc/thread/rthread.c
parent656e4d685fd7883ead5aee41081a9727aa804d42 (diff)
Implement __cxa_thread_atexit to support C++11 thread_local scope. The
interface is also made available as __cxa_thread_atexit_impl to satisfy the needs of GNU libstdc++. ok guenther@, millert@
Diffstat (limited to 'lib/libc/thread/rthread.c')
-rw-r--r--lib/libc/thread/rthread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/thread/rthread.c b/lib/libc/thread/rthread.c
index 66405cf477a..f26e85ffd31 100644
--- a/lib/libc/thread/rthread.c
+++ b/lib/libc/thread/rthread.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread.c,v 1.6 2017/11/04 22:53:57 jca Exp $ */
+/* $OpenBSD: rthread.c,v 1.7 2017/12/05 13:45:31 kettenis Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -137,6 +137,7 @@ pthread_exit(void *retval)
oclfn->fn(oclfn->arg);
free(oclfn);
}
+ _thread_finalize();
_rthread_tls_destructors(thread);
if (_thread_cb.tc_thread_release != NULL)