mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 16:57:35 +02:00
Fixed race condition on startup
This commit is contained in:
parent
9199bf512a
commit
e5bf6e0e4e
2 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,6 @@ static void Cyc_heap_init(long heap_size)
|
|||
printf("main: Allocating and initializing heap...\n");
|
||||
#endif
|
||||
gc_init_heap(heap_size);
|
||||
gc_initialize();
|
||||
gc_start_collector();
|
||||
}
|
||||
|
||||
|
|
|
@ -81,13 +81,14 @@
|
|||
mclosure0(entry_pt,&c_entry_pt); // First function to execute
|
||||
_cyc_argc = argc;
|
||||
_cyc_argv = argv;
|
||||
Cyc_heap_init(heap_size);
|
||||
gc_initialize();
|
||||
thd = malloc(sizeof(gc_thread_data));
|
||||
gc_thread_data_init(thd, 0, (char *) &stack_size, stack_size);
|
||||
thd->gc_cont = &entry_pt;
|
||||
thd->gc_args[0] = &clos_halt;
|
||||
thd->gc_num_args = 1;
|
||||
gc_add_mutator(thd);
|
||||
Cyc_heap_init(heap_size);
|
||||
Cyc_start_thread(thd);
|
||||
return 0;}")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue