summaryrefslogtreecommitdiff
path: root/firmware/export/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/thread.h')
-rw-r--r--firmware/export/thread.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/firmware/export/thread.h b/firmware/export/thread.h
index 0db849ab0a..d0f61f9d85 100644
--- a/firmware/export/thread.h
+++ b/firmware/export/thread.h
@@ -323,9 +323,6 @@ struct thread_entry
323#define THREAD_ID_SLOT_MASK 0x00ff 323#define THREAD_ID_SLOT_MASK 0x00ff
324#define THREAD_ID_INIT(n) ((1u << THREAD_ID_VERSION_SHIFT) | (n)) 324#define THREAD_ID_INIT(n) ((1u << THREAD_ID_VERSION_SHIFT) | (n))
325 325
326/* Specify current thread in a function taking an ID. */
327#define THREAD_ID_CURRENT ((unsigned int)-1)
328
329#ifdef HAVE_CORELOCK_OBJECT 326#ifdef HAVE_CORELOCK_OBJECT
330/* Operations to be performed just before stopping a thread and starting 327/* Operations to be performed just before stopping a thread and starting
331 a new one if specified before calling switch_thread */ 328 a new one if specified before calling switch_thread */
@@ -445,7 +442,13 @@ int thread_get_io_priority(unsigned int thread_id);
445#if NUM_CORES > 1 442#if NUM_CORES > 1
446unsigned int switch_core(unsigned int new_core); 443unsigned int switch_core(unsigned int new_core);
447#endif 444#endif
448unsigned int thread_get_current(void); 445
446/* Return the id of the calling thread. */
447unsigned int thread_self(void);
448
449/* Return the thread_entry for the calling thread.
450 * INTERNAL: Intended for use by kernel and not for programs. */
451struct thread_entry* thread_self_entry(void);
449 452
450/* Debugging info - only! */ 453/* Debugging info - only! */
451int thread_stack_usage(const struct thread_entry *thread); 454int thread_stack_usage(const struct thread_entry *thread);