-.\" $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.
.\" 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
.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
.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
.Fn ppoll
function appeared in
.Ox 5.4 .
-.Sh BUGS
+.Sh CAVEATS
The
.Dv POLLWRBAND
flag is accepted but ignored by the kernel.
-/* $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
#ifndef _KERNEL
#include <sys/cdefs.h>
-#if __BSD_VISIBLE
+#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE
#include <sys/_types.h>
#ifndef _SIGSET_T_DEFINED_
__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 */