Refactoring

Renamed cyc_start_thread to cyc_start_trampoline to be more clear about what the function actually does.
This commit is contained in:
Justin Ethier 2016-01-03 22:56:34 -05:00
parent d89a81eca6
commit a889d6fb6f
3 changed files with 4 additions and 4 deletions

View file

@ -192,7 +192,7 @@ object memberp(void *,object,list);
object memqp(void *,object,list); object memqp(void *,object,list);
object Cyc_spawn_thread(object thunk); object Cyc_spawn_thread(object thunk);
void Cyc_start_thread(gc_thread_data *thd); void Cyc_start_trampoline(gc_thread_data *thd);
void Cyc_end_thread(gc_thread_data *thd); void Cyc_end_thread(gc_thread_data *thd);
void Cyc_exit_thread(gc_thread_data *thd); void Cyc_exit_thread(gc_thread_data *thd);
object Cyc_thread_sleep(void *data, object timeout); object Cyc_thread_sleep(void *data, object timeout);

View file

@ -2180,7 +2180,7 @@ void Cyc_apply_from_buf(void *data, int argc, object prim, object *buf) {
TODO: should rename this function to make it more clear what is really going on TODO: should rename this function to make it more clear what is really going on
*/ */
void Cyc_start_thread(gc_thread_data *thd) void Cyc_start_trampoline(gc_thread_data *thd)
{ {
// Tank, load the jump program // Tank, load the jump program
setjmp(*(thd->jmp_start)); setjmp(*(thd->jmp_start));
@ -2873,7 +2873,7 @@ void *Cyc_init_thread(object thunk)
// would also need to update termination code to free that memory // would also need to update termination code to free that memory
gc_add_mutator(thd); gc_add_mutator(thd);
ck_pr_cas_int((int *)&(thd->thread_state), CYC_THREAD_STATE_NEW, CYC_THREAD_STATE_RUNNABLE); ck_pr_cas_int((int *)&(thd->thread_state), CYC_THREAD_STATE_NEW, CYC_THREAD_STATE_RUNNABLE);
Cyc_start_thread(thd); Cyc_start_trampoline(thd);
return NULL; return NULL;
} }

View file

@ -90,7 +90,7 @@
gc_add_mutator(thd); gc_add_mutator(thd);
Cyc_heap_init(heap_size); Cyc_heap_init(heap_size);
thd->thread_state = CYC_THREAD_STATE_RUNNABLE; thd->thread_state = CYC_THREAD_STATE_RUNNABLE;
Cyc_start_thread(thd); Cyc_start_trampoline(thd);
return 0;}") return 0;}")
;;; Auto-generation of C macros ;;; Auto-generation of C macros