diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-21 19:38:45 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-21 19:38:45 +0300 |
| commit | 1a5248bb177242a34fd51efadb4af941853d5e35 (patch) | |
| tree | 669565c49217876611565c42867dcf0126e08933 /include/apos | |
| parent | 7967a9ab13214543041e4408086668b4db8d3e62 (diff) | |
| download | kmi-1a5248bb177242a34fd51efadb4af941853d5e35.tar.gz kmi-1a5248bb177242a34fd51efadb4af941853d5e35.zip | |
use uint64_t for timer ticks
+ GCC seems to provide this even on 32bit platforms, though I should
really check.
Diffstat (limited to 'include/apos')
| -rw-r--r-- | include/apos/syscalls.h | 3 | ||||
| -rw-r--r-- | include/apos/timer.h | 5 | ||||
| -rw-r--r-- | include/apos/uapi.h | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/include/apos/syscalls.h b/include/apos/syscalls.h index d9df89b..ed18872 100644 --- a/include/apos/syscalls.h +++ b/include/apos/syscalls.h @@ -11,7 +11,8 @@ enum { SYS_FREE_MEM, /* free memory */ /* timers */ - SYS_REQ_TIMER, + SYS_REQ_REL_TIMER, + SYS_REQ_ABS_TIMER, SYS_FREE_TIMER, /* IPC */ diff --git a/include/apos/timer.h b/include/apos/timer.h index ea5bd03..e68009a 100644 --- a/include/apos/timer.h +++ b/include/apos/timer.h @@ -3,7 +3,10 @@ #include <apos/types.h> -typedef size_t ticks_t; +/* GCC will compile uint64_t even on 32bit platforms, just with some runtime + * overhead, should be fine. This will allow us to have a reasonable time range + * even with nanosecond clocks. (138 years with ~4.2 Hz clock) */ +typedef uint64_t ticks_t; /* whichever time unit we're dealing with */ typedef size_t tunit_t; diff --git a/include/apos/uapi.h b/include/apos/uapi.h index fb7dff7..18f086c 100644 --- a/include/apos/uapi.h +++ b/include/apos/uapi.h @@ -64,7 +64,8 @@ SYSCALL_DECLARE(req_sharedmem); SYSCALL_DECLARE(free_mem); /* timers */ -SYSCALL_DECLARE(req_timer); +SYSCALL_DECLARE(req_rel_timer); +SYSCALL_DECLARE(req_abs_timer); SYSCALL_DECLARE(free_timer); /* ipc */ |
