diff options
Diffstat (limited to 'cpukit/libcsupport/include/sys/ioccom.h')
-rw-r--r-- | cpukit/libcsupport/include/sys/ioccom.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/cpukit/libcsupport/include/sys/ioccom.h b/cpukit/libcsupport/include/sys/ioccom.h index 09b4728e49..6d97c679f4 100644 --- a/cpukit/libcsupport/include/sys/ioccom.h +++ b/cpukit/libcsupport/include/sys/ioccom.h @@ -36,7 +36,7 @@ #ifndef _SYS_IOCCOM_H_ #define _SYS_IOCCOM_H_ -#include <sys/types.h> +#include <rtems.h> /* * Ioctl's have the command encoded in the lower word, and the size of @@ -76,6 +76,29 @@ #define RTEMS_IO_RCVWAKEUP 4 #define RTEMS_IO_SNDWAKEUP 5 +typedef enum { + RTEMS_IOCTL_SELECT_OTHER, + RTEMS_IOCTL_SELECT_READ, + RTEMS_IOCTL_SELECT_WRITE +} rtems_ioctl_select_kind; + +/** + * @brief IO control request for select() support. + * + * The driver shall return + * - 1, when the request can be fullfilled immediately, + * - 0, when the request task must wait, and + * - -1, in case of an error. + */ +typedef struct { + rtems_ioctl_select_kind kind; + rtems_id request_task_id; +} rtems_ioctl_select_request; + +#define RTEMS_IOCTL_SELECT _IOW('R', 0, rtems_ioctl_select_request) + +#define RTEMS_IOCTL_SELECT_EVENT RTEMS_EVENT_24 + /* copied from libnetworking/sys/filio.h and commented out there */ /* Generic file-descriptor ioctl's. */ #define FIOCLEX _IO('f', 1) /* set close on exec on fd */ |