diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-19 22:57:53 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-19 22:57:53 +0100 |
commit | 13db03fcc4a476c8881ccafe0852e72410c67b3a (patch) | |
tree | 2064def0c74cb78cf2a532766b4e1d28e571ab41 /src/lib | |
parent | adc5a421917dd6e23a2fc01dc9fb2a9f881c291d (diff) | |
download | kogata-13db03fcc4a476c8881ccafe0852e72410c67b3a.tar.gz kogata-13db03fcc4a476c8881ccafe0852e72410c67b3a.zip |
Add kernel worker threads for handling various tasks (eg. interrupts)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/include/syscall.h | 1 | ||||
-rw-r--r-- | src/lib/libkogata/syscall.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/include/syscall.h b/src/lib/include/syscall.h index 0f1efb0..fb82c33 100644 --- a/src/lib/include/syscall.h +++ b/src/lib/include/syscall.h @@ -15,6 +15,7 @@ typedef int fd_t; void dbg_print(const char* str); void yield(); void exit(int code); +void usleep(int usecs); bool mmap(void* addr, size_t size, int mode); bool mmap_file(fd_t file, size_t offset, void* addr, size_t size, int mode); diff --git a/src/lib/libkogata/syscall.c b/src/lib/libkogata/syscall.c index 2e0ef0f..afda7c7 100644 --- a/src/lib/libkogata/syscall.c +++ b/src/lib/libkogata/syscall.c @@ -35,6 +35,10 @@ void exit(int code) { call(SC_EXIT, code, 0, 0, 0, 0); } +void usleep(int usecs) { + call(SC_USLEEP, usecs, 0, 0, 0, 0); +} + bool mmap(void* addr, size_t size, int mode) { return call(SC_MMAP, (uint32_t)addr, size, mode, 0, 0); } |