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/hidden/sys/socket.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/libc/hidden/sys/socket.h') diff --git a/lib/libc/hidden/sys/socket.h b/lib/libc/hidden/sys/socket.h index d262e0f3bac..2d8b3e4f120 100644 --- a/lib/libc/hidden/sys/socket.h +++ b/lib/libc/hidden/sys/socket.h @@ -1,4 +1,4 @@ -/* $OpenBSD: socket.h,v 1.3 2015/10/04 07:17:27 guenther Exp $ */ +/* $OpenBSD: socket.h,v 1.4 2016/05/07 19:05:22 guenther Exp $ */ /* * Copyright (c) 2015 Philip Guenther * @@ -20,7 +20,10 @@ #include_next +PROTO_CANCEL(accept); +PROTO_CANCEL(accept4); PROTO_NORMAL(bind); +PROTO_CANCEL(connect); PROTO_DEPRECATED(getpeereid); PROTO_NORMAL(getpeername); PROTO_NORMAL(getrtable); @@ -28,7 +31,11 @@ PROTO_NORMAL(getsockname); PROTO_NORMAL(getsockopt); PROTO_NORMAL(listen); PROTO_NORMAL(recv); +PROTO_CANCEL(recvfrom); +PROTO_CANCEL(recvmsg); PROTO_NORMAL(send); +PROTO_CANCEL(sendmsg); +PROTO_CANCEL(sendto); PROTO_NORMAL(setrtable); PROTO_NORMAL(setsockopt); PROTO_NORMAL(shutdown); -- cgit v1.2.3-59-g8ed1b