summaryrefslogtreecommitdiffstats
path: root/include/signal.h
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-04-06 01:39:16 +0000
committerpfg <pfg@FreeBSD.org>2015-04-06 01:39:16 +0000
commitcb4cf650b01eb87fd29d08f800cc409ada79bfb0 (patch)
treebfe8c34c1990c129daa869d6fab191672ea7ec14 /include/signal.h
parentd89b4285c116c1f3c77e031e0b4c26c272248478 (diff)
downloadFreeBSD-src-cb4cf650b01eb87fd29d08f800cc409ada79bfb0.zip
FreeBSD-src-cb4cf650b01eb87fd29d08f800cc409ada79bfb0.tar.gz
Make use of gcc attributes in some standard include headers.
The `nonnull' attribute specifies that some function parameters should be non-null pointers. This is very useful as it helps the compiler generate warnings on suspicious code and can also enable some small optimizations. Also start using 'alloc_size' attribute in the allocator functions. This is an initial step to better integrate our libc with the compiler: these attributes are fully supported by clang and they are also useful for the static analyzer. Note that due to some bogus internal procedure in the way gcc ports are built they may require updating if they were built before r280801. Relnotes: yes Hinted by: Android's bionic libc Differential Revision: https://reviews.freebsd.org/D2107
Diffstat (limited to 'include/signal.h')
-rw-r--r--include/signal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/signal.h b/include/signal.h
index dca19aa..895ccc3 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -78,10 +78,10 @@ int sigdelset(sigset_t *, int);
int sigemptyset(sigset_t *);
int sigfillset(sigset_t *);
int sigismember(const sigset_t *, int);
-int sigpending(sigset_t *);
+int sigpending(sigset_t *) __nonnull(1);
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
-int sigsuspend(const sigset_t *);
-int sigwait(const sigset_t * __restrict, int * __restrict);
+int sigsuspend(const sigset_t *) __nonnull(1);
+int sigwait(const sigset_t * __restrict, int * __restrict) __nonnull_all;
#endif
#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600
OpenPOWER on IntegriCloud