diff options
author | Richard Braun <rbraun@sceen.net> | 2017-07-13 20:07:07 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-07-13 20:07:07 +0200 |
commit | b2ad7d862388558556288877a65f2797528168f4 (patch) | |
tree | 4d3080abf0cbcca7c058cba5cad2ed71e5d5e1e5 /kern/thread.h | |
parent | cacd797c0c1825301f21aab18a7ce2c410d14535 (diff) |
Switch to initialization operations
Diffstat (limited to 'kern/thread.h')
-rw-r--r-- | kern/thread.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/kern/thread.h b/kern/thread.h index 760bb5ec..f46f90c1 100644 --- a/kern/thread.h +++ b/kern/thread.h @@ -170,15 +170,6 @@ thread_attr_set_priority(struct thread_attr *attr, unsigned short priority) } /* - * Early initialization of the thread module. - * - * These function make it possible to use migration and preemption control - * operations (and in turn, spin locks) during bootstrap. - */ -void thread_bootstrap(void); -void thread_ap_bootstrap(void); - -/* * Thread entry point. * * Loaded TCBs are expected to call this function with interrupts disabled. @@ -186,9 +177,9 @@ void thread_ap_bootstrap(void); void thread_main(void (*fn)(void *), void *arg); /* - * Initialize the thread module. + * Initialization of the thread module on APs. */ -void thread_setup(void); +void thread_ap_setup(void); /* * Create a thread. @@ -740,4 +731,24 @@ thread_get_specific(unsigned int key) return thread_tsd_get(thread_self(), key); } +/* + * This init operation provides : + * - a dummy thread context for the BSP, allowing the use of thread_self() + */ +INIT_OP_DECLARE(thread_setup_booter); + +/* + * This init operation provides : + * - same as thread_setup_booter + * - BSP run queue initialization + */ +INIT_OP_DECLARE(thread_bootstrap); + +/* + * This init operation provides : + * - thread creation + * - module fully initialized + */ +INIT_OP_DECLARE(thread_setup); + #endif /* _KERN_THREAD_H */ |