summaryrefslogtreecommitdiff
path: root/os_dep.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-05-11 15:27:30 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:59 +0200
commit50ec4c5ca243cc90403b1e399f2b4272887f2e93 (patch)
treeea53260d2411181186ae79033f0bd600a8dbd4e5 /os_dep.c
parent3c60adf047fe57b0edff8dc5aa456b7e72e89cef (diff)
2011-05-11 Ivan Maidanski <ivmai@mail.ru>
* backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro. * os_dep.c (GC_set_and_save_fault_handler): Recognize SIGACTION_FLAGS_NODEFER_HACK macro. * pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK macro. * pthread_support.c (GC_acquire_mark_lock): Remove commented out code. * include/gc_inline.h (GC_MALLOC_WORDS, GC_MALLOC_ATOMIC_WORDS, GC_CONS): Remove trailing space (before back-slash). * include/private/gc_hdrs.h (GET_BI, GET_HDR_ADDR): Ditto. * include/private/gc_pmark.h (PUSH_OBJ, PUSH_CONTENTS, SET_MARK_BIT_EXIT_IF_SET, LONG_MULT, PUSH_CONTENTS_HDR, GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): Ditto. * include/private/thread_local_alloc.h (GC_key_create): Ditto. * include/private/gc_priv.h (SUNOS5SIGS): Don't include sys/siginfo.h on Linux. * include/private/gcconfig.h: Reformat comments (and some code). * include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro recognized, force PREFETCH_FOR_WRITE to be defined on x86. * include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New macro recognized (for HP/UX).
Diffstat (limited to 'os_dep.c')
-rw-r--r--os_dep.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/os_dep.c b/os_dep.c
index ed8726e..bff6cde 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -855,16 +855,17 @@ GC_INNER word GC_page_size = 0;
GC_INNER void GC_set_and_save_fault_handler(GC_fault_handler_t h)
{
-# if defined(SUNOS5SIGS) || defined(IRIX5) \
+# if defined(SUNOS5SIGS) || defined(IRIX5) \
|| defined(OSF1) || defined(HURD) || defined(NETBSD)
- struct sigaction act;
+ struct sigaction act;
- act.sa_handler = h;
-# if 0 /* Was necessary for Solaris 2.3 and very temporary */
- /* NetBSD bugs. */
- act.sa_flags = SA_RESTART | SA_NODEFER;
+ act.sa_handler = h;
+# ifdef SIGACTION_FLAGS_NODEFER_HACK
+ /* Was necessary for Solaris 2.3 and very temporary */
+ /* NetBSD bugs. */
+ act.sa_flags = SA_RESTART | SA_NODEFER;
# else
- act.sa_flags = SA_RESTART;
+ act.sa_flags = SA_RESTART;
# endif
(void) sigemptyset(&act.sa_mask);
@@ -893,8 +894,8 @@ GC_INNER word GC_page_size = 0;
}
# endif /* NEED_FIND_LIMIT || UNIX_LIKE */
-# if defined(NEED_FIND_LIMIT) || \
- defined(USE_PROC_FOR_LIBRARIES) && defined(THREADS)
+# if defined(NEED_FIND_LIMIT) \
+ || (defined(USE_PROC_FOR_LIBRARIES) && defined(THREADS))
/* Some tools to implement HEURISTIC2 */
# define MIN_PAGE_SIZE 256 /* Smallest conceivable page size, bytes */