A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
64bits sizes induce tiny timing differences
[simgrid.git]
/
acmacro
/
context.m4
diff --git
a/acmacro/context.m4
b/acmacro/context.m4
index
152ed2d
..
f90eaf5
100644
(file)
--- a/
acmacro/context.m4
+++ b/
acmacro/context.m4
@@
-1,7
+1,7
@@
dnl AC_CHECK_UCONTEXT: Check whether ucontext are working
dnl Most of the code is stolen from the GNU pth autoconf macros by
dnl AC_CHECK_UCONTEXT: Check whether ucontext are working
dnl Most of the code is stolen from the GNU pth autoconf macros by
-dnl Ralf S. Engelschall.
As
+dnl Ralf S. Engelschall.
dnl # ``"Reuse an expert's code" is the right
dnl # advice for most people. But it's a useless
dnl # advice for the experts writing the code
dnl # ``"Reuse an expert's code" is the right
dnl # advice for most people. But it's a useless
dnl # advice for the experts writing the code
@@
-67,7
+67,7
@@
dnl ## ...stack grow up...
dnl ## #endif
dnl ##
dnl ## #endif
dnl ##
-AC_DEFUN(
AC_CHECK_STACKGROWTH
,[dnl
+AC_DEFUN(
[AC_CHECK_STACKGROWTH]
,[dnl
AC_MSG_CHECKING(for direction of stack growth)
AC_CACHE_VAL(ac_cv_check_stackgrowth, [
cross_compiling=no
AC_MSG_CHECKING(for direction of stack growth)
AC_CACHE_VAL(ac_cv_check_stackgrowth, [
cross_compiling=no
@@
-122,7
+122,7
@@
dnl ## configure.ac:
dnl ## AC_CHECK_MCSC(<success-action>, <failure-action>)
dnl ##
dnl ## AC_CHECK_MCSC(<success-action>, <failure-action>)
dnl ##
-AC_DEFUN(
AC_CHECK_MCSC
, [
+AC_DEFUN(
[AC_CHECK_MCSC]
, [
AC_MSG_CHECKING(for usable SVR4/SUSv2 makecontext(2)/swapcontext(2))
AC_CACHE_VAL(ac_cv_check_mcsc, [
AC_TRY_RUN([
AC_MSG_CHECKING(for usable SVR4/SUSv2 makecontext(2)/swapcontext(2))
AC_CACHE_VAL(ac_cv_check_mcsc, [
AC_TRY_RUN([
@@
-139,7
+139,7
@@
void child(void *arg)
if (arg != (void *)12345)
exit(1);
if (swapcontext(&uc_child, &uc_main) != 0)
if (arg != (void *)12345)
exit(1);
if (swapcontext(&uc_child, &uc_main) != 0)
- exit(
1
);
+ exit(
2
);
}
int main(int argc, char *argv[])
}
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)
/* 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)
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)
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;
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)
/* 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)
/* Fine, child came home */
if ((fp = fopen("conftestval", "w")) == NULL)
- exit(
1
);
+ exit(
7
);
fprintf(fp, "yes\n");
fclose(fp);
fprintf(fp, "yes\n");
fclose(fp);
@@
-209,7
+209,7
@@
dnl ## xxx.sp_ss = <macro-addr>(skaddr, sksize);
dnl ## xxx.sp_size = <macro-size>(skaddr, sksize);
dnl ##
dnl ## xxx.sp_size = <macro-size>(skaddr, sksize);
dnl ##
-AC_DEFUN(
AC_CHECK_STACKSETUP
,[dnl
+AC_DEFUN(
[AC_CHECK_STACKSETUP]
,[dnl
dnl # check for consistent usage
ifelse($1,[sigstack],,[
ifelse($1,[sigaltstack],,[
dnl # check for consistent usage
ifelse($1,[sigstack],,[
ifelse($1,[sigaltstack],,[