1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-18 00:22:26 +02:00

More API-ification

This commit is contained in:
Andy Wingo 2022-08-09 11:35:31 +02:00
parent 4ccb489869
commit d8bcbf2d74
5 changed files with 30 additions and 25 deletions

View file

@ -307,9 +307,9 @@ struct call_with_gc_data {
};
static void* call_with_gc_inner(uintptr_t *stack_base, void *arg) {
struct call_with_gc_data *data = arg;
struct mutator *mut = initialize_gc_for_thread(stack_base, data->heap);
struct mutator *mut = gc_init_for_thread(stack_base, data->heap);
void *ret = data->f(mut);
finish_gc_for_thread(mut);
gc_finish_for_thread(mut);
return ret;
}
static void* call_with_gc(void* (*f)(struct mutator *),
@ -434,7 +434,7 @@ int main(int argc, char *argv[]) {
run_one_test(mut);
for (size_t i = 1; i < nthreads; i++) {
struct join_data data = { 0, threads[i] };
call_without_gc(mut, join_thread, &data);
gc_call_without_gc(mut, join_thread, &data);
if (data.status) {
errno = data.status;
perror("Failed to join thread");