1ioctl_pipe(2) System Calls Manual ioctl_pipe(2)
2
3
4
6 ioctl_pipe - ioctl() operations for General notification mechanism
7
9 #include <linux/watch_queue.h> /* Definition of IOC_WATCH_QUEUE_* */
10 #include <sys/ioctl.h>
11
12 int ioctl(int pipefd[1], IOC_WATCH_QUEUE_SET_SIZE, int size);
13 int ioctl(int pipefd[1], IOC_WATCH_QUEUE_SET_FILTER,
14 struct watch_notification_filter *filter);
15
17 The following ioctl(2) operations are provided to set up general noti‐
18 fication queue parameters. The notification queue is built on the top
19 of a pipe(2) opened with the O_NOTIFICATION_PIPE flag.
20
21 IOC_WATCH_QUEUE_SET_SIZE (since Linux 5.8)
22 Preallocates the pipe buffer memory so that it can fit size no‐
23 tification messages. Currently, size must be between 1 and 512.
24
25 IOC_WATCH_QUEUE_SET_FILTER (since Linux 5.8)
26 Watch queue filter can limit events that are received. Filters
27 are passed in a struct watch_notification_filter and each filter
28 is described by a struct watch_notification_type_filter struc‐
29 ture.
30
31 struct watch_notification_filter {
32 __u32 nr_filters;
33 __u32 __reserved;
34 struct watch_notification_type_filter filters[];
35 };
36
37 struct watch_notification_type_filter {
38 __u32 type;
39 __u32 info_filter;
40 __u32 info_mask;
41 __u32 subtype_filter[8];
42 };
43
45 pipe(2), ioctl(2)
46
47
48
49Linux man-pages 6.05 2023-05-03 ioctl_pipe(2)