From fe38b55cb0aae270de3f844146814682e8cd345c Mon Sep 17 00:00:00 2001 From: guenther Date: Sat, 7 May 2016 19:05:21 +0000 Subject: Use a Thread Information Block in both single and multi-threaded programs. This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable! Make libpthread dlopen'able by moving the cancelation wrappers into libc and doing locking and fork/errno handling via callbacks that libpthread registers when it first initializes. 'errno' *must* be declared via now! Clean up libpthread's symbol exports like libc. On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec. Testing by various, particularly sthen@ and patrick@ ok kettenis@ --- lib/libc/thread/unithread_malloc_lock.c | 76 --------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 lib/libc/thread/unithread_malloc_lock.c (limited to 'lib/libc/thread/unithread_malloc_lock.c') diff --git a/lib/libc/thread/unithread_malloc_lock.c b/lib/libc/thread/unithread_malloc_lock.c deleted file mode 100644 index d813bc708f2..00000000000 --- a/lib/libc/thread/unithread_malloc_lock.c +++ /dev/null @@ -1,76 +0,0 @@ -/* $OpenBSD: unithread_malloc_lock.c,v 1.9 2015/04/07 01:27:07 guenther Exp $ */ - -#include -#include "thread_private.h" - -WEAK_PROTOTYPE(_thread_malloc_lock); -WEAK_PROTOTYPE(_thread_malloc_unlock); - -WEAK_ALIAS(_thread_malloc_lock); -WEAK_ALIAS(_thread_malloc_unlock); - -WEAK_PROTOTYPE(_thread_atexit_lock); -WEAK_PROTOTYPE(_thread_atexit_unlock); - -WEAK_ALIAS(_thread_atexit_lock); -WEAK_ALIAS(_thread_atexit_unlock); - -WEAK_PROTOTYPE(_thread_atfork_lock); -WEAK_PROTOTYPE(_thread_atfork_unlock); - -WEAK_ALIAS(_thread_atfork_lock); -WEAK_ALIAS(_thread_atfork_unlock); - -WEAK_PROTOTYPE(_thread_arc4_lock); -WEAK_PROTOTYPE(_thread_arc4_unlock); - -WEAK_ALIAS(_thread_arc4_lock); -WEAK_ALIAS(_thread_arc4_unlock); - -void -WEAK_NAME(_thread_malloc_lock)(void) -{ - return; -} - -void -WEAK_NAME(_thread_malloc_unlock)(void) -{ - return; -} - -void -WEAK_NAME(_thread_atexit_lock)(void) -{ - return; -} - -void -WEAK_NAME(_thread_atexit_unlock)(void) -{ - return; -} - -void -WEAK_NAME(_thread_atfork_lock)(void) -{ - return; -} - -void -WEAK_NAME(_thread_atfork_unlock)(void) -{ - return; -} - -void -WEAK_NAME(_thread_arc4_lock)(void) -{ - return; -} - -void -WEAK_NAME(_thread_arc4_unlock)(void) -{ - return; -} -- cgit v1.2.3-59-g8ed1b