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/kernel/user/vfs.c | |
parent | bcee004478c6448541ce583e75c706e185190800 (diff) | |
download | kogata-6dd488b87fdc47fb377ba648a6cd598bdab87f59.tar.gz kogata-6dd488b87fdc47fb377ba648a6cd598bdab87f59.zip |
Implement select ; add two tests for channels.
Diffstat (limited to 'src/kernel/user/vfs.c')
-rw-r--r-- | src/kernel/user/vfs.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/kernel/user/vfs.c b/src/kernel/user/vfs.c index 4e8cf53..05b4a2c 100644 --- a/src/kernel/user/vfs.c +++ b/src/kernel/user/vfs.c @@ -494,4 +494,13 @@ bool file_readdir(fs_handle_t *f, size_t ent_no, dirent_t *d) { return f->ops->readdir && f->ops->readdir(f, ent_no, d); } +int file_poll(fs_handle_t *f, void** out_wait_obj) { + if (!f->ops->poll) { + if (out_wait_obj) *out_wait_obj = 0; + return 0; + } + + return f->ops->poll(f, out_wait_obj); +} + /* vim: set ts=4 sw=4 tw=0 noet :*/ |