summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/thread.h1
-rw-r--r--firmware/thread.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/firmware/export/thread.h b/firmware/export/thread.h
index 2ff4694159..3a979722b9 100644
--- a/firmware/export/thread.h
+++ b/firmware/export/thread.h
@@ -150,6 +150,7 @@ void wakeup_thread(struct thread_entry **thread);
150int thread_set_priority(struct thread_entry *thread, int priority); 150int thread_set_priority(struct thread_entry *thread, int priority);
151int thread_get_priority(struct thread_entry *thread); 151int thread_get_priority(struct thread_entry *thread);
152#endif 152#endif
153struct thread_entry * thread_get_current(void);
153void init_threads(void); 154void init_threads(void);
154int thread_stack_usage(const struct thread_entry *thread); 155int thread_stack_usage(const struct thread_entry *thread);
155int thread_get_status(const struct thread_entry *thread); 156int thread_get_status(const struct thread_entry *thread);
diff --git a/firmware/thread.c b/firmware/thread.c
index 281ab0fa54..614286c422 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
@@ -776,6 +776,11 @@ int thread_get_priority(struct thread_entry *thread)
776} 776}
777#endif 777#endif
778 778
779struct thread_entry * thread_get_current(void)
780{
781 return cores[CURRENT_CORE].running;
782}
783
779void init_threads(void) 784void init_threads(void)
780{ 785{
781 unsigned int core = CURRENT_CORE; 786 unsigned int core = CURRENT_CORE;