summaryrefslogtreecommitdiffstats
path: root/lib/libc/hidden/sys/socket.h
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/hidden/sys/socket.h
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/hidden/sys/socket.h')
-rw-r--r--lib/libc/hidden/sys/socket.h9
1 files changed, 8 insertions, 1 deletions
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 <guenther@openbsd.org>
*
@@ -20,7 +20,10 @@
#include_next <sys/socket.h>
+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);