From: guenther Date: Sun, 4 Aug 2024 22:28:08 +0000 (+0000) Subject: ppoll() is in POSIX-2024. Update #include visibility and manpages X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8d1d79aad141f2db570c64aaef927ac323ed46ac;p=openbsd ppoll() is in POSIX-2024. Update #include visibility and manpages and add restrict qualifiers. While here, rename the BUGS section to CAVEATS since they're really "these probably don't do what you want" notes and not things that need fixing. ok millert@ --- diff --git a/lib/libc/sys/poll.2 b/lib/libc/sys/poll.2 index c8e03f29ea5..1b77bd0ba0a 100644 --- a/lib/libc/sys/poll.2 +++ b/lib/libc/sys/poll.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: poll.2,v 1.40 2023/07/18 04:17:17 asou Exp $ +.\" $OpenBSD: poll.2,v 1.41 2024/08/04 22:28:08 guenther Exp $ .\" .\" Copyright (c) 1994 Jason R. Thorpe .\" All rights reserved. @@ -28,7 +28,7 @@ .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" -.Dd $Mdocdate: July 18 2023 $ +.Dd $Mdocdate: August 4 2024 $ .Dt POLL 2 .Os .Sh NAME @@ -40,7 +40,7 @@ .Ft int .Fn poll "struct pollfd *fds" "nfds_t nfds" "int timeout" .Ft int -.Fn ppoll "struct pollfd *fds" "nfds_t nfds" "const struct timespec *timeout" "const sigset_t *mask" +.Fn ppoll "struct pollfd *fds" "nfds_t nfds" "const struct timespec * restrict timeout" "const sigset_t * restrict mask" .Sh DESCRIPTION .Fn poll provides a mechanism for multiplexing I/O across a set of file @@ -325,12 +325,10 @@ The timeout passed was invalid. .Sh STANDARDS The .Fn poll -function is compliant with the -.St -p1003.1-2008 -specification. -The +and .Fn ppoll -function is a Linux extension. +functions conform to +.St -p1003.1-2024 . .Sh HISTORY A .Fn poll @@ -340,7 +338,7 @@ The .Fn ppoll function appeared in .Ox 5.4 . -.Sh BUGS +.Sh CAVEATS The .Dv POLLWRBAND flag is accepted but ignored by the kernel. diff --git a/sys/sys/poll.h b/sys/sys/poll.h index 30daa17bca8..f3e16e54fee 100644 --- a/sys/sys/poll.h +++ b/sys/sys/poll.h @@ -1,4 +1,4 @@ -/* $OpenBSD: poll.h,v 1.15 2016/06/07 06:12:37 deraadt Exp $ */ +/* $OpenBSD: poll.h,v 1.16 2024/08/04 22:28:08 guenther Exp $ */ /* * Copyright (c) 1996 Theo de Raadt @@ -56,7 +56,7 @@ typedef unsigned int nfds_t; #ifndef _KERNEL #include -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE #include #ifndef _SIGSET_T_DEFINED_ @@ -80,8 +80,8 @@ struct timespec { __BEGIN_DECLS int poll(struct pollfd[], nfds_t, int); -#if __BSD_VISIBLE -int ppoll(struct pollfd[], nfds_t, const struct timespec *, const sigset_t *); +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE +int ppoll(struct pollfd[], nfds_t, const struct timespec * __restrict, const sigset_t * __restrict); #endif /* __BSD_VISIBLE */ __END_DECLS #endif /* _KERNEL */