diff options
Diffstat (limited to 'firmware')
| -rw-r--r-- | firmware/export/thread.h | 1 | ||||
| -rw-r--r-- | firmware/thread.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/firmware/export/thread.h b/firmware/export/thread.h index 2ff4694..3a97972 100644 --- a/firmware/export/thread.h +++ b/firmware/export/thread.h @@ -150,6 +150,7 @@ void wakeup_thread(struct thread_entry **thread); int thread_set_priority(struct thread_entry *thread, int priority); int thread_get_priority(struct thread_entry *thread); #endif +struct thread_entry * thread_get_current(void); void init_threads(void); int thread_stack_usage(const struct thread_entry *thread); int thread_get_status(const struct thread_entry *thread); diff --git a/firmware/thread.c b/firmware/thread.c index 281ab0f..614286c 100644 --- a/firmware/thread.c +++ b/firmware/thread.c @@ -776,6 +776,11 @@ int thread_get_priority(struct thread_entry *thread) } #endif +struct thread_entry * thread_get_current(void) +{ + return cores[CURRENT_CORE].running; +} + void init_threads(void) { unsigned int core = CURRENT_CORE; |