handle locking more carefully (especially protect gc and stack shifting).

This commit is contained in:
Vitor Santos Costa
2014-04-23 22:41:12 +01:00
parent 83ec7d9072
commit aba5f3d88b
22 changed files with 362 additions and 136 deletions

View File

@@ -131,6 +131,8 @@ exec_top_level(int BootMode, YAP_init_args *iap)
YAP_Exit(EXIT_SUCCESS);
}
FILE *debugf;
#ifdef LIGHT
int
_main (int argc, char **argv)
@@ -143,7 +145,13 @@ main (int argc, char **argv)
YAP_init_args init_args;
int i;
#if DEBUG_LOCKS
char buf[1024];
sprintf(buf, "/tmp/yap%d", getpid());
debugf= fopen(buf, "w");
if (!debugf) fprintf(stderr,"ERROR %s\n", strerror(errno));
setvbuf( debugf,NULL, _IOLBF, 1024);
#endif
BootMode = init_standard_system(argc, argv, &init_args);
if (BootMode == YAP_BOOT_ERROR) {
fprintf(stderr,"[ FATAL ERROR: could not find saved state ]\n");