From 17a2b672301685981cc6dad0e1f202c7567ccbc9 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Tue, 5 Dec 2017 13:45:32 +0000 Subject: 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@ --- lib/libc/thread/rthread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libc/thread/rthread.c') 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 * 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) -- cgit v1.2.3