diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-12 16:46:13 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-12 16:46:13 +0000 |
commit | d595a12c236b07e1e1413696ec8106cba630cb75 (patch) | |
tree | 280f06f343391367e48a76b47c221b36fdfa5c45 /lib/libc | |
parent | 745c6261947363cd07e248a014ecf973a87658be (diff) |
Finish wrapping <signal.h> so that calls to the sigset ops go direct and
everything but raise() and signal() are weak.
No longer need _thread_sys_ prefix on getthrid()
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/raise.c | 7 | ||||
-rw-r--r-- | lib/libc/gen/sigsetops.c | 7 | ||||
-rw-r--r-- | lib/libc/hidden/signal.h | 25 |
3 files changed, 30 insertions, 9 deletions
diff --git a/lib/libc/gen/raise.c b/lib/libc/gen/raise.c index d80513fc3fc..b477183d141 100644 --- a/lib/libc/gen/raise.c +++ b/lib/libc/gen/raise.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raise.c,v 1.6 2012/11/10 03:46:11 guenther Exp $ */ +/* $OpenBSD: raise.c,v 1.7 2015/09/12 16:46:12 guenther Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -31,10 +31,9 @@ #include <signal.h> #include <unistd.h> -int _thread_sys_getthrid(void); - int raise(int s) { - return(kill(_thread_sys_getthrid(), s)); + return (kill(getthrid(), s)); } +DEF_STRONG(raise); diff --git a/lib/libc/gen/sigsetops.c b/lib/libc/gen/sigsetops.c index 76d2a74ffad..180a5899f84 100644 --- a/lib/libc/gen/sigsetops.c +++ b/lib/libc/gen/sigsetops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sigsetops.c,v 1.6 2010/12/31 02:58:57 guenther Exp $ */ +/* $OpenBSD: sigsetops.c,v 1.7 2015/09/12 16:46:12 guenther Exp $ */ /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -46,6 +46,7 @@ sigemptyset(sigset_t *set) *set = 0; return (0); } +DEF_WEAK(sigemptyset); int sigfillset(sigset_t *set) @@ -53,6 +54,7 @@ sigfillset(sigset_t *set) *set = ~(sigset_t)0; return (0); } +DEF_WEAK(sigfillset); int sigaddset(sigset_t *set, int signo) @@ -64,6 +66,7 @@ sigaddset(sigset_t *set, int signo) *set |= sigmask(signo); return (0); } +DEF_WEAK(sigaddset); int sigdelset(sigset_t *set, int signo) @@ -75,6 +78,7 @@ sigdelset(sigset_t *set, int signo) *set &= ~sigmask(signo); return (0); } +DEF_WEAK(sigdelset); int sigismember(const sigset_t *set, int signo) @@ -85,3 +89,4 @@ sigismember(const sigset_t *set, int signo) } return ((*set & sigmask(signo)) != 0); } +DEF_WEAK(sigismember); diff --git a/lib/libc/hidden/signal.h b/lib/libc/hidden/signal.h index 7b1dd2e40f1..725d03e136e 100644 --- a/lib/libc/hidden/signal.h +++ b/lib/libc/hidden/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.4 2015/09/11 15:38:33 guenther Exp $ */ +/* $OpenBSD: signal.h,v 1.5 2015/09/12 16:46:12 guenther Exp $ */ /* * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> * @@ -27,11 +27,28 @@ __END_HIDDEN_DECLS extern PROTO_NORMAL(sys_siglist); extern PROTO_NORMAL(sys_signame); -PROTO_NORMAL(signal); - +PROTO_DEPRECATED(bsd_signal); PROTO_NORMAL(kill); /* wrap to ban SIGTHR? */ +PROTO_DEPRECATED(killpg); +PROTO_DEPRECATED(psignal); +/*PROTO_NORMAL(pthread_sigmask);*/ +PROTO_NORMAL(raise); +/*PROTO_WRAP(sigaction); wrap to hide SIGTHR */ +PROTO_NORMAL(sigaddset); PROTO_NORMAL(sigaltstack); -PROTO_NORMAL(sigpending); +PROTO_DEPRECATED(sigblock); +PROTO_NORMAL(sigdelset); +PROTO_NORMAL(sigemptyset); +PROTO_NORMAL(sigfillset); +PROTO_DEPRECATED(siginterrupt); +PROTO_NORMAL(sigismember); +PROTO_NORMAL(signal); +PROTO_DEPRECATED(sigpause); +/*PROTO_NORMAL(sigpending); wrap to hide SIGTHR */ +/*PROTO_WRAP(sigprocmask); wrap to hide SIGTHR */ PROTO_NORMAL(sigreturn); +PROTO_DEPRECATED(sigsetmask); +/*PROTO_CANCEL(sigsuspend); wrap to hide SIGTHR */ +PROTO_DEPRECATED(sigvec); #endif /* !_LIBC_SIGNAL_H */ |