summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/i386/sys/tfork_thread.S
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2016-05-07 19:05:21 +0000
committerguenther <guenther@openbsd.org>2016-05-07 19:05:21 +0000
commitfe38b55cb0aae270de3f844146814682e8cd345c (patch)
tree9825cc8aa96314e8e79ea1802ccbc9349772680b /lib/libc/arch/i386/sys/tfork_thread.S
parentImplement ACPI 5.0 GeneralPurposeIo OpRegion support. This basically allows (diff)
downloadwireguard-openbsd-fe38b55cb0aae270de3f844146814682e8cd345c.tar.xz
wireguard-openbsd-fe38b55cb0aae270de3f844146814682e8cd345c.zip
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 <errno.h> 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@
Diffstat (limited to 'lib/libc/arch/i386/sys/tfork_thread.S')
-rw-r--r--lib/libc/arch/i386/sys/tfork_thread.S12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/libc/arch/i386/sys/tfork_thread.S b/lib/libc/arch/i386/sys/tfork_thread.S
index 2f07845ea68..97a515f0ae8 100644
--- a/lib/libc/arch/i386/sys/tfork_thread.S
+++ b/lib/libc/arch/i386/sys/tfork_thread.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: tfork_thread.S,v 1.7 2015/09/05 06:22:47 guenther Exp $ */
+/* $OpenBSD: tfork_thread.S,v 1.8 2016/05/07 19:05:21 guenther Exp $ */
/*-
* Copyright (c) 2000 Peter Wemm <peter@FreeBSD.org>
* All rights reserved.
@@ -112,12 +112,6 @@ ENTRY(__tfork_thread)
popl %esi
movl %ebp, %esp
popl %ebp
-#ifdef __PIC__
- PIC_PROLOGUE
- movl PIC_GOT(CERROR), %ecx
- PIC_EPILOGUE
- jmp *%ecx
-#else
- jmp CERROR
-#endif
+ HANDLE_ERRNO()
+ ret
END(__tfork_thread)