* [PATCH v2] ioctl_pipe.2: Add page.
@ 2023-04-03 14:08 Cyril Hrubis
2023-04-08 14:05 ` Alejandro Colomar
0 siblings, 1 reply; 2+ messages in thread
From: Cyril Hrubis @ 2023-04-03 14:08 UTC (permalink / raw)
To: linux-man; +Cc: alx.manpages, mtk.manpages, David Howells
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
man2/ioctl_pipe.2 | 56 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 man2/ioctl_pipe.2
diff --git a/man2/ioctl_pipe.2 b/man2/ioctl_pipe.2
new file mode 100644
index 000000000..afdf05236
--- /dev/null
+++ b/man2/ioctl_pipe.2
@@ -0,0 +1,56 @@
+.\" Copyright (c) 2022 by Cyril Hrubis <chrubi@suse.cz>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH IOCTL_PIPE 2 2022-08-06 "Linux" "Linux Programmer's Manual"
+.SH NAME
+ioctl_pipe \- ioctl() operations for General notification mechanism
+.SH SYNOPSIS
+.nf
+.B #include <linux/watch_queue.h>
+.PP
+.BI "int ioctl(int " pipefd[1] ", IOC_WATCH_QUEUE_SET_SIZE, int " size ");
+.BI "int ioctl(int " pipefd[1] ", IOC_WATCH_QUEUE_SET_FILTER, \
+struct watch_notification_filter * " filter ");
+.fi
+.SH DESCRIPTION
+The following
+.BR ioctl (2)
+operations are provided to set up general notification queue parameters.
+The notification queue is build on the top of a
+.BR pipe (2)
+opened with the
+.B O_NOTIFICATION_PIPE
+flag.
+.TP
+.BR IOC_WATCH_QUEUE_SET_SIZE " (since Linux 5.8)"
+.\" commit c73be61cede5882f9605a852414db559c0ebedfd
+Preallocates the pipe buffer memory so that it can fit size notification
+messages. Currently the size must be between 1 and 512.
+.TP
+.BR IOC_WATCH_QUEUE_SET_FILTER " (since Linux 5.8)"
+.\" commit c73be61cede5882f9605a852414db559c0ebedfd
+Watch queue filter can limit events that are received. Filters are passed in a
+.I struct watch_notification_filter
+and each filter is described by
+.I struct watch_notification_type_filter
+structure.
+.PP
+.EX
+struct watch_notification_filter {
+ __u32 nr_filters;
+ __u32 __reserved;
+ struct watch_notification_type_filter filters[];
+};
+
+struct watch_notification_type_filter {
+ __u32 type;
+ __u32 info_filter;
+ __u32 info_mask;
+ __u32 subtype_filter[8];
+};
+.EE
+.PP
+.SH SEE ALSO
+.BR pipe (2),
+.BR ioctl (2)
--
2.39.2
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ioctl_pipe.2: Add page.
2023-04-03 14:08 [PATCH v2] ioctl_pipe.2: Add page Cyril Hrubis
@ 2023-04-08 14:05 ` Alejandro Colomar
0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Colomar @ 2023-04-08 14:05 UTC (permalink / raw)
To: Cyril Hrubis, linux-man; +Cc: mtk.manpages, David Howells
[-- Attachment #1.1: Type: text/plain, Size: 2460 bytes --]
Hi Cyril,
On 4/3/23 16:08, Cyril Hrubis wrote:
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
I applied the page with some tweaks.
Thanks,
Alex
> ---
> man2/ioctl_pipe.2 | 56 +++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 56 insertions(+)
> create mode 100644 man2/ioctl_pipe.2
>
> diff --git a/man2/ioctl_pipe.2 b/man2/ioctl_pipe.2
> new file mode 100644
> index 000000000..afdf05236
> --- /dev/null
> +++ b/man2/ioctl_pipe.2
> @@ -0,0 +1,56 @@
> +.\" Copyright (c) 2022 by Cyril Hrubis <chrubi@suse.cz>
> +.\"
> +.\" SPDX-License-Identifier: Linux-man-pages-copyleft
> +.\"
> +.TH IOCTL_PIPE 2 2022-08-06 "Linux" "Linux Programmer's Manual"
> +.SH NAME
> +ioctl_pipe \- ioctl() operations for General notification mechanism
> +.SH SYNOPSIS
> +.nf
> +.B #include <linux/watch_queue.h>
> +.PP
> +.BI "int ioctl(int " pipefd[1] ", IOC_WATCH_QUEUE_SET_SIZE, int " size ");
> +.BI "int ioctl(int " pipefd[1] ", IOC_WATCH_QUEUE_SET_FILTER, \
> +struct watch_notification_filter * " filter ");
> +.fi
> +.SH DESCRIPTION
> +The following
> +.BR ioctl (2)
> +operations are provided to set up general notification queue parameters.
> +The notification queue is build on the top of a
> +.BR pipe (2)
> +opened with the
> +.B O_NOTIFICATION_PIPE
> +flag.
> +.TP
> +.BR IOC_WATCH_QUEUE_SET_SIZE " (since Linux 5.8)"
> +.\" commit c73be61cede5882f9605a852414db559c0ebedfd
> +Preallocates the pipe buffer memory so that it can fit size notification
> +messages. Currently the size must be between 1 and 512.
> +.TP
> +.BR IOC_WATCH_QUEUE_SET_FILTER " (since Linux 5.8)"
> +.\" commit c73be61cede5882f9605a852414db559c0ebedfd
> +Watch queue filter can limit events that are received. Filters are passed in a
> +.I struct watch_notification_filter
> +and each filter is described by
> +.I struct watch_notification_type_filter
> +structure.
> +.PP
> +.EX
> +struct watch_notification_filter {
> + __u32 nr_filters;
> + __u32 __reserved;
> + struct watch_notification_type_filter filters[];
> +};
> +
> +struct watch_notification_type_filter {
> + __u32 type;
> + __u32 info_filter;
> + __u32 info_mask;
> + __u32 subtype_filter[8];
> +};
> +.EE
> +.PP
> +.SH SEE ALSO
> +.BR pipe (2),
> +.BR ioctl (2)
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-08 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-03 14:08 [PATCH v2] ioctl_pipe.2: Add page Cyril Hrubis
2023-04-08 14:05 ` Alejandro Colomar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox