summaryrefslogtreecommitdiff
path: root/src/lib/libc/include
diff options
context:
space:
mode:
authorguenther <>2015-10-23 04:39:24 +0000
committerguenther <>2015-10-23 04:39:24 +0000
commit0318167b7689b32eb9d5c7f8d5de7eada56299b7 (patch)
treec03c5fcb25ad2078365518e9089e736909cc59ae /src/lib/libc/include
parent3dd284a67fd444a40f7de3ef07b8d29b0dfc6e78 (diff)
downloadopenbsd-0318167b7689b32eb9d5c7f8d5de7eada56299b7.tar.gz
openbsd-0318167b7689b32eb9d5c7f8d5de7eada56299b7.tar.bz2
openbsd-0318167b7689b32eb9d5c7f8d5de7eada56299b7.zip
Merge the sigaction() and sigprocmask() overloads/wrappers from libpthread
into libc, and move pthread_sigmask() as well (just a trivial wrapper). This provides consistent handling of SIGTHR between single- and multi-threaded programs and is a step in the merge of all the libpthread overloads, providing some ASM and Makefile bits that the other wrappers will need. ok deraadt@ millert@
Diffstat (limited to 'src/lib/libc/include')
-rw-r--r--src/lib/libc/include/namespace.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libc/include/namespace.h b/src/lib/libc/include/namespace.h
index cfdb95ad02..569668d0ac 100644
--- a/src/lib/libc/include/namespace.h
+++ b/src/lib/libc/include/namespace.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: namespace.h,v 1.7 2015/09/11 09:18:27 guenther Exp $ */ 1/* $OpenBSD: namespace.h,v 1.8 2015/10/23 04:39:24 guenther Exp $ */
2 2
3#ifndef _LIBC_NAMESPACE_H_ 3#ifndef _LIBC_NAMESPACE_H_
4#define _LIBC_NAMESPACE_H_ 4#define _LIBC_NAMESPACE_H_
@@ -69,7 +69,7 @@
69 * 69 *
70 * WRAP(x) 70 * WRAP(x)
71 * This expands to the internal, hidden name of a non-cancellation 71 * This expands to the internal, hidden name of a non-cancellation
72 * wrapper: _libc_x_wrap. ex: WRAP(sigpending)(set) 72 * wrapper: _libc_x_wrap. ex: WRAP(sigprocmask)(set)
73 * 73 *
74 * 74 *
75 * In order to actually set up the desired asm labels, we use these in 75 * In order to actually set up the desired asm labels, we use these in
@@ -91,8 +91,9 @@
91 * ex: PROTO_CANCEL(wait4) 91 * ex: PROTO_CANCEL(wait4)
92 * 92 *
93 * PROTO_WRAP(x) Functions that have wrappers for other reasons 93 * PROTO_WRAP(x) Functions that have wrappers for other reasons
94 * This makes gcc convert use of x to use _libc_x_wrap instead. 94 * Like PROTO_NORMAL(x), but also declares _libc_x_wrap. Internal
95 * ex: PROTO_WRAP(setlogin) 95 * calls that want the wrapper's processing should invoke WRAP(x)(...)
96 * ex: PROTO_WRAP(sigaction)
96 * 97 *
97 * 98 *
98 * Finally, to create the expected aliases, we use these in the .c files 99 * Finally, to create the expected aliases, we use these in the .c files
@@ -144,7 +145,7 @@
144#define PROTO_STD_DEPRECATED(x) typeof(x) x __attribute__((deprecated)) 145#define PROTO_STD_DEPRECATED(x) typeof(x) x __attribute__((deprecated))
145#define PROTO_DEPRECATED(x) typeof(x) x __attribute__((deprecated, weak)) 146#define PROTO_DEPRECATED(x) typeof(x) x __attribute__((deprecated, weak))
146#define PROTO_CANCEL(x) PROTO_NORMAL(x), CANCEL(x) 147#define PROTO_CANCEL(x) PROTO_NORMAL(x), CANCEL(x)
147#define PROTO_WRAP(x) __dso_hidden typeof(x) x asm(WRAP_STRING(x)) 148#define PROTO_WRAP(x) PROTO_NORMAL(x), WRAP(x)
148 149
149#define DEF_STRONG(x) __strong_alias(x, HIDDEN(x)) 150#define DEF_STRONG(x) __strong_alias(x, HIDDEN(x))
150#define DEF_WEAK(x) __weak_alias(x, HIDDEN(x)) 151#define DEF_WEAK(x) __weak_alias(x, HIDDEN(x))