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/lib/libkogata | |
parent | bcee004478c6448541ce583e75c706e185190800 (diff) | |
download | kogata-6dd488b87fdc47fb377ba648a6cd598bdab87f59.tar.gz kogata-6dd488b87fdc47fb377ba648a6cd598bdab87f59.zip |
Implement select ; add two tests for channels.
Diffstat (limited to 'src/lib/libkogata')
-rw-r--r-- | src/lib/libkogata/syscall.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libkogata/syscall.c b/src/lib/libkogata/syscall.c index 7ae0283..b724e69 100644 --- a/src/lib/libkogata/syscall.c +++ b/src/lib/libkogata/syscall.c @@ -39,9 +39,8 @@ void usleep(int usecs) { call(SC_USLEEP, usecs, 0, 0, 0, 0); } -bool new_thread(entry_t entry, void* data) { - // TODO - return false; +bool sys_new_thread(void* eip, void* esp) { + return call(SC_NEW_THREAD, (uint32_t)eip, (uint32_t)esp, 0, 0, 0); } void exit_thread() { @@ -98,6 +97,9 @@ int ioctl(fd_t file, int command, void* data) { int get_mode(fd_t file) { return call(SC_GET_MODE, file, 0, 0, 0, 0); } +bool select(sel_fd_t* fds, size_t nfds, int timeout) { + return call(SC_SELECT, (uint32_t)fds, nfds, timeout, 0, 0); +} fd_pair_t make_channel(bool blocking) { fd_pair_t ret; |