ioctl_pipe(2) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | SEE ALSO | COLOPHON

ioctl_pipe(2)              System Calls Manual             ioctl_pipe(2)

NAME         top

       ioctl_pipe - ioctl() operations for General notification
       mechanism

SYNOPSIS         top

       #include <linux/watch_queue.h>  /* Definition of IOC_WATCH_QUEUE_* */
       #include <sys/ioctl.h>

       int ioctl(int pipefd[1], IOC_WATCH_QUEUE_SET_SIZE, int size);
       int ioctl(int pipefd[1], IOC_WATCH_QUEUE_SET_FILTER,
                 struct watch_notification_filter *filter);

DESCRIPTION         top

       The following ioctl(2) operations are provided to set up general
       notification queue parameters.  The notification queue is built
       on the top of a pipe(2) opened with the O_NOTIFICATION_PIPE flag.

       IOC_WATCH_QUEUE_SET_SIZE (since Linux 5.8)
              Preallocates the pipe buffer memory so that it can fit
              size notification messages.  Currently, size must be
              between 1 and 512.

       IOC_WATCH_QUEUE_SET_FILTER (since Linux 5.8)
              Watch queue filter can limit events that are received.
              Filters are passed in a struct watch_notification_filter
              and each filter is described by a struct
              watch_notification_type_filter structure.

                  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];
                  };

SEE ALSO         top

       pipe(2), ioctl(2)

COLOPHON         top

       This page is part of the man-pages (Linux kernel and C library
       user-space interface documentation) project.  Information about
       the project can be found at 
       ⟨https://www.kernel.org/doc/man-pages/⟩.  If you have a bug report
       for this manual page, see
       ⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩.
       This page was obtained from the tarball man-pages-6.9.1.tar.gz
       fetched from
       ⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on
       2024-06-26.  If you discover any rendering problems in this HTML
       version of the page, or you believe there is a better or more up-
       to-date source for the page, or you have corrections or
       improvements to the information in this COLOPHON (which is not
       part of the original manual page), send a mail to
       man-pages@man7.org

Linux man-pages 6.9.1          2024-05-02                  ioctl_pipe(2)