diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 19:07:48 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 19:07:48 +0100 |
commit | 6dd488b87fdc47fb377ba648a6cd598bdab87f59 (patch) | |
tree | 2e69225353054eb43a9869af4ca9766a0f39c828 /src/common/include/fs.h | |
parent | bcee004478c6448541ce583e75c706e185190800 (diff) | |
download | kogata-6dd488b87fdc47fb377ba648a6cd598bdab87f59.tar.gz kogata-6dd488b87fdc47fb377ba648a6cd598bdab87f59.zip |
Implement select ; add two tests for channels.
Diffstat (limited to 'src/common/include/fs.h')
-rw-r--r-- | src/common/include/fs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/include/fs.h b/src/common/include/fs.h index 431c16f..5a2fc84 100644 --- a/src/common/include/fs.h +++ b/src/common/include/fs.h @@ -3,6 +3,8 @@ #include <stdint.h> #include <stddef.h> +typedef int fd_t; + #define FT_REGULAR 0 // no flags = regular file #define FT_DIR (0x01) #define FT_DEV (0x02) @@ -28,6 +30,7 @@ #define FM_ALL_MODES (0xFFFF) + typedef struct { int type; int access; @@ -46,4 +49,14 @@ typedef struct { #define IOCTL_BLOCKDEV_GET_BLOCK_SIZE 40 #define IOCTL_BLOCKDEV_GET_BLOCK_COUNT 41 + +#define SEL_READ 0x01 +#define SEL_WRITE 0x02 +#define SEL_ERROR 0x04 + +typedef struct { + fd_t fd; + uint16_t req_flags, got_flags; // rq_flags : what caller is interested in +} sel_fd_t; + /* vim: set ts=4 sw=4 tw=0 noet :*/ |