X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=libgc%2Fmisc.c;h=480759c57b9a750d505e053ca2f29a99a5c2a770;hb=49a0494ecbf91d362af0b0301eccbf45dadf6817;hp=e21db5b3209890893ba09853cc01a6bdaac89378;hpb=8ef4e4703172fd32ada3f74b22df5203b4683493;p=mono.git diff --git a/libgc/misc.c b/libgc/misc.c index e21db5b3209..480759c57b9 100644 --- a/libgc/misc.c +++ b/libgc/misc.c @@ -473,13 +473,24 @@ size_t GC_get_total_bytes GC_PROTO(()) int GC_get_suspend_signal GC_PROTO(()) { -#if defined(SIG_SUSPEND) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS) +#if defined(SIG_SUSPEND) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS) && !defined(GC_OPENBSD_THREADS) return SIG_SUSPEND; #else return -1; #endif } +int GC_get_thr_restart_signal GC_PROTO(()) +{ +#if defined(SIG_THR_RESTART) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS) && !defined(GC_OPENBSD_THREADS) + return SIG_THR_RESTART; +#else + return -1; +#endif +} + + + GC_bool GC_is_initialized = FALSE; void GC_init() @@ -684,7 +695,7 @@ void GC_init_inner() # if defined(SEARCH_FOR_DATA_START) GC_init_linux_data_start(); # endif -# if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__) +# if defined(NETBSD) && defined(__ELF__) GC_init_netbsd_elf(); # endif # if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) \ @@ -1003,7 +1014,11 @@ long a, b, c, d, e, f; buf[1024] = 0x15; (void) sprintf(buf, format, a, b, c, d, e, f); if (buf[1024] != 0x15) ABORT("GC_printf clobbered stack"); +#ifdef NACL + WRITE(GC_stdout, buf, strlen(buf)); +#else if (WRITE(GC_stdout, buf, strlen(buf)) < 0) ABORT("write to stdout failed"); +#endif } void GC_err_printf(format, a, b, c, d, e, f) @@ -1015,13 +1030,21 @@ long a, b, c, d, e, f; buf[1024] = 0x15; (void) sprintf(buf, format, a, b, c, d, e, f); if (buf[1024] != 0x15) ABORT("GC_err_printf clobbered stack"); +#ifdef NACL + WRITE(GC_stderr, buf, strlen(buf)); +#else if (WRITE(GC_stderr, buf, strlen(buf)) < 0) ABORT("write to stderr failed"); +#endif } void GC_err_puts(s) GC_CONST char *s; { +#ifdef NACL + WRITE(GC_stderr, s, strlen(s)); +#else if (WRITE(GC_stderr, s, strlen(s)) < 0) ABORT("write to stderr failed"); +#endif } #if defined(LINUX) && !defined(SMALL_CONFIG)