File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,6 +154,9 @@ STATIC void *thread_entry(void *args_in) {
154154 mp_stack_set_top (& ts + 1 ); // need to include ts in root-pointer scan
155155 mp_stack_set_limit (16 * 1024 ); // fixed stack limit for now
156156
157+ // signal that we are set up and running
158+ mp_thread_start ();
159+
157160 // TODO set more thread-specific state here:
158161 // mp_pending_exception? (root pointer)
159162 // cur_exception (root pointer)
@@ -182,6 +185,9 @@ STATIC void *thread_entry(void *args_in) {
182185
183186 DEBUG_printf ("[thread] finish ts=%p\n" , & ts );
184187
188+ // signal that we are finished
189+ mp_thread_finish ();
190+
185191 return NULL ;
186192}
187193
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ struct _mp_state_thread_t;
4141struct _mp_state_thread_t * mp_thread_get_state (void );
4242void mp_thread_set_state (void * state );
4343void mp_thread_create (void * (* entry )(void * ), void * arg , size_t stack_size );
44+ void mp_thread_start (void );
45+ void mp_thread_finish (void );
4446void mp_thread_mutex_init (mp_thread_mutex_t * mutex );
4547int mp_thread_mutex_lock (mp_thread_mutex_t * mutex , int wait );
4648void mp_thread_mutex_unlock (mp_thread_mutex_t * mutex );
You can’t perform that action at this time.
0 commit comments