X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/88c3069468fdbf586cdcc972e4e3a47f5d11bca0..2ef44ad1ef520a0d1ade150a0dfd1e8f6d60807f:/acmacro/context.m4 diff --git a/acmacro/context.m4 b/acmacro/context.m4 index 17dff0777b..f90eaf530f 100644 --- a/acmacro/context.m4 +++ b/acmacro/context.m4 @@ -139,7 +139,7 @@ void child(void *arg) if (arg != (void *)12345) exit(1); if (swapcontext(&uc_child, &uc_main) != 0) - exit(1); + exit(2); } int main(int argc, char *argv[]) @@ -149,15 +149,15 @@ int main(int argc, char *argv[]) /* the default is that it fails */ if ((fp = fopen("conftestval", "w")) == NULL) - exit(1); + exit(3); fprintf(fp, "no\n"); fclose(fp); /* configure a child user-space context */ if ((stack = malloc(64*1024)) == NULL) - exit(1); + exit(4); if (getcontext(&uc_child) != 0) - exit(1); + exit(5); uc_child.uc_link = NULL; uc_child.uc_stack.ss_sp = (char *)stack+(32*1024); uc_child.uc_stack.ss_size = 32*1024; @@ -166,11 +166,11 @@ int main(int argc, char *argv[]) /* switch into the user context */ if (swapcontext(&uc_main, &uc_child) != 0) - exit(1); + exit(6); /* Fine, child came home */ if ((fp = fopen("conftestval", "w")) == NULL) - exit(1); + exit(7); fprintf(fp, "yes\n"); fclose(fp);