summaryrefslogtreecommitdiff
path: root/src/osal/osal_zephyr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osal/osal_zephyr.h')
-rw-r--r--src/osal/osal_zephyr.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/osal/osal_zephyr.h b/src/osal/osal_zephyr.h
index f0e1a6a2e..c84ce3970 100644
--- a/src/osal/osal_zephyr.h
+++ b/src/osal/osal_zephyr.h
@@ -31,10 +31,20 @@
//--------------------------------------------------------------------+
// TASK API
//--------------------------------------------------------------------+
+typedef k_tid_t osal_task_handle_t;
+
+TU_ATTR_ALWAYS_INLINE static inline osal_task_handle_t osal_task_get_current_handle(void) {
+ return k_current_get();
+}
+
TU_ATTR_ALWAYS_INLINE static inline void osal_task_delay(uint32_t msec) {
k_msleep(msec);
}
+TU_ATTR_ALWAYS_INLINE static inline uint32_t osal_time_millis(void) {
+ return k_uptime_get_32();
+}
+
//--------------------------------------------------------------------+
// Spinlock API
//--------------------------------------------------------------------+