Use scm_with_guile' in test-pthread-create'.
* test-suite/standalone/test-pthread-create.c (inner_main): New function. (main): Call it within `scm_with_guile', instead of using `scm_init_guile'. This improves portability--e.g., `GC_get_stack_base', used by `scm_init_guile', failed on Darwin up to BDW-GC 7.1alpha4 included (thanks, Mark, for the hint.)
This commit is contained in:
parent
dd7d0148f2
commit
7c86abd9ce
1 changed files with 11 additions and 5 deletions
|
|
@ -42,15 +42,12 @@ thread (void *arg)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void *
|
||||||
int
|
inner_main (void *data)
|
||||||
main (int argc, char *argv[])
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
pthread_t thr;
|
pthread_t thr;
|
||||||
|
|
||||||
scm_init_guile ();
|
|
||||||
|
|
||||||
do_something (NULL);
|
do_something (NULL);
|
||||||
|
|
||||||
for (i = 0; i < 77; i++)
|
for (i = 0; i < 77; i++)
|
||||||
|
|
@ -59,5 +56,14 @@ main (int argc, char *argv[])
|
||||||
pthread_join (thr, NULL);
|
pthread_join (thr, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main (int argc, char *argv[])
|
||||||
|
{
|
||||||
|
scm_with_guile (inner_main, NULL);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue