kernel/timeout: Enable 64 bit timeout precision
Add a CONFIG_TIMEOUT_64BIT kconfig that, when selected, makes the
k_ticks_t used in timeout computations pervasively 64 bit. This will
allow much longer timeouts and much faster (i.e. more precise) tick
rates. It also enables the use of absolute (not delta) timeouts in an
upcoming commit.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ece51e..80b8964 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -604,6 +604,10 @@
set(SYSCALL_LONG_REGISTERS_ARG --long-registers)
endif()
+if(CONFIG_TIMEOUT_64BIT)
+ set(SYSCALL_SPLIT_TIMEOUT_ARG --split-type k_timeout_t)
+endif()
+
add_custom_command(OUTPUT include/generated/syscall_dispatch.c ${syscall_list_h}
# Also, some files are written to include/generated/syscalls/
COMMAND
@@ -614,6 +618,7 @@
--syscall-dispatch include/generated/syscall_dispatch.c # Write this file
--syscall-list ${syscall_list_h}
${SYSCALL_LONG_REGISTERS_ARG}
+ ${SYSCALL_SPLIT_TIMEOUT_ARG}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${PARSE_SYSCALLS_TARGET}
${syscalls_json}