aboutsummaryrefslogtreecommitdiffstats
path: root/include/signal.h
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2015-04-06 01:39:16 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2015-04-06 01:39:16 +0000
commit153cbcd6579a5c285e7f384c09211b081bb800c4 (patch)
treebfe8c34c1990c129daa869d6fab191672ea7ec14 /include/signal.h
parenta1c1feb511ea04fec55420931d1733576819ff2b (diff)
downloadsrc-153cbcd6579a5c285e7f384c09211b081bb800c4.tar.gz
src-153cbcd6579a5c285e7f384c09211b081bb800c4.zip
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
Notes
Notes: svn path=/head/; revision=281130
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 dca19aaa8613..895ccc30bc06 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