|
@ -146,6 +146,8 @@ typedef struct _thread_entry_args_t { |
|
|
} thread_entry_args_t; |
|
|
} thread_entry_args_t; |
|
|
|
|
|
|
|
|
STATIC void *thread_entry(void *args_in) { |
|
|
STATIC void *thread_entry(void *args_in) { |
|
|
|
|
|
// Execution begins here for a new thread. We do not have the GIL.
|
|
|
|
|
|
|
|
|
thread_entry_args_t *args = (thread_entry_args_t*)args_in; |
|
|
thread_entry_args_t *args = (thread_entry_args_t*)args_in; |
|
|
|
|
|
|
|
|
mp_state_thread_t ts; |
|
|
mp_state_thread_t ts; |
|
@ -154,6 +156,8 @@ STATIC void *thread_entry(void *args_in) { |
|
|
mp_stack_set_top(&ts + 1); // need to include ts in root-pointer scan
|
|
|
mp_stack_set_top(&ts + 1); // need to include ts in root-pointer scan
|
|
|
mp_stack_set_limit(16 * 1024); // fixed stack limit for now
|
|
|
mp_stack_set_limit(16 * 1024); // fixed stack limit for now
|
|
|
|
|
|
|
|
|
|
|
|
MP_THREAD_GIL_ENTER(); |
|
|
|
|
|
|
|
|
// signal that we are set up and running
|
|
|
// signal that we are set up and running
|
|
|
mp_thread_start(); |
|
|
mp_thread_start(); |
|
|
|
|
|
|
|
@ -188,6 +192,8 @@ STATIC void *thread_entry(void *args_in) { |
|
|
// signal that we are finished
|
|
|
// signal that we are finished
|
|
|
mp_thread_finish(); |
|
|
mp_thread_finish(); |
|
|
|
|
|
|
|
|
|
|
|
MP_THREAD_GIL_EXIT(); |
|
|
|
|
|
|
|
|
return NULL; |
|
|
return NULL; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|