diff options
Diffstat (limited to 'firmware/thread.c')
| -rw-r--r-- | firmware/thread.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/thread.c b/firmware/thread.c index 6a94a52..4094877 100644 --- a/firmware/thread.c +++ b/firmware/thread.c @@ -711,6 +711,14 @@ int thread_set_priority(struct thread_entry *thread, int priority) return old_priority; } + +int thread_get_priority(struct thread_entry *thread) +{ + if (thread == NULL) + thread = cores[CURRENT_CORE].running; + + return thread->priority; +} #endif void init_threads(void) |