From 8cb28826ffaccd2f9f9f0c77c9cfdf61d1100069 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 31 Oct 2013 15:00:20 +0100 Subject: Filesystem: Add kernel event filter handler This handler is necessary to implement the KQUEUE(2) system calls. Add from FreeBSD 8.4. --- cpukit/libcsupport/include/rtems/libio.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'cpukit/libcsupport/include/rtems/libio.h') diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index a6420620c3..21d57ebddf 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -41,6 +41,8 @@ extern "C" { #endif +struct knote; + /** * @defgroup LibIOFSOps File System Operations * @@ -957,6 +959,22 @@ typedef int (*rtems_filesystem_poll_t)( int events ); +/** + * @brief Kernel event filter support. + * + * @param[in, out] iop The IO pointer. + * @param[in] kn The kernel event note. + * + * @retval 0 Successful operation. + * @retval error An error occurred. This is usually EINVAL. + * + * @see rtems_filesystem_default_kqfilter(). + */ +typedef int (*rtems_filesystem_kqfilter_t)( + rtems_libio_t *iop, + struct knote *kn +); + /** * @brief File system node operations table. */ @@ -973,6 +991,7 @@ struct _rtems_filesystem_file_handlers_r { rtems_filesystem_fdatasync_t fdatasync_h; rtems_filesystem_fcntl_t fcntl_h; rtems_filesystem_poll_t poll_h; + rtems_filesystem_kqfilter_t kqfilter_h; }; /** @@ -1158,6 +1177,18 @@ int rtems_filesystem_default_poll( int events ); +/** + * @brief Default kernel event filter handler. + * + * @retval EINVAL Always. + * + * @see rtems_filesystem_kqfilter_t. + */ +int rtems_filesystem_default_kqfilter( + rtems_libio_t *iop, + struct knote *kn +); + /** @} */ /** -- cgit v1.2.3