summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/include/rtems/libio.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-31 15:00:14 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-04 15:22:47 +0100
commit16829460572c9d8451154b2c296ac1abb7701b78 (patch)
treec92fd3fed60437b55a04f7d7e451dd636ec44da5 /cpukit/libcsupport/include/rtems/libio.h
parentbsp/realview-pbx-a9: Add NULL pointer protection (diff)
downloadrtems-16829460572c9d8451154b2c296ac1abb7701b78.tar.bz2
Filesystem: Add poll() handler
This handler is necessary to implement the SELECT(2) and POLL(2) system calls. Add <sys/poll.h> from FreeBSD 8.4.
Diffstat (limited to 'cpukit/libcsupport/include/rtems/libio.h')
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index aa64ff35c4..a6420620c3 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -943,6 +943,21 @@ typedef int (*rtems_filesystem_fcntl_t)(
);
/**
+ * @brief Poll and select support.
+ *
+ * @param[in, out] iop The IO pointer.
+ * @param[in] events The poll events.
+ *
+ * @return The poll return events.
+ *
+ * @see rtems_filesystem_default_poll().
+ */
+typedef int (*rtems_filesystem_poll_t)(
+ rtems_libio_t *iop,
+ int events
+);
+
+/**
* @brief File system node operations table.
*/
struct _rtems_filesystem_file_handlers_r {
@@ -957,6 +972,7 @@ struct _rtems_filesystem_file_handlers_r {
rtems_filesystem_fsync_t fsync_h;
rtems_filesystem_fdatasync_t fdatasync_h;
rtems_filesystem_fcntl_t fcntl_h;
+ rtems_filesystem_poll_t poll_h;
};
/**
@@ -1130,6 +1146,18 @@ int rtems_filesystem_default_fcntl(
int cmd
);
+/**
+ * @brief Default poll handler.
+ *
+ * @retval POLLERR Always.
+ *
+ * @see rtems_filesystem_poll_t.
+ */
+int rtems_filesystem_default_poll(
+ rtems_libio_t *iop,
+ int events
+);
+
/** @} */
/**