summaryrefslogtreecommitdiff
path: root/include/libunwind_i.h
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2009-09-21 13:04:33 -0700
committerArun Sharma <arun@garage-pc.(none)>2009-09-25 09:36:41 -0700
commit9aa0d6d6805b3b4a852f7e478364301bb31230ae (patch)
treead92f1f5b5aceed20e8009e6838c48de39d2a958 /include/libunwind_i.h
parent84d4150668d83a98420cc91e00026159c3d74a81 (diff)
downloadlibunwind-9aa0d6d6805b3b4a852f7e478364301bb31230ae.tar.gz
Allow caller to block signals.
Greetings, Here is the second part, actually implementing the configure option. Thanks, -- Paul Pluzhnikov commit cf823ed0d4d2447aa91af0e3cb5fbb6a6cba5068 Author: Paul Pluzhnikov <ppluzhnikov@google.com> Date: Mon Sep 21 11:37:38 2009 -0700 New configure option to allow caller to block signals.
Diffstat (limited to 'include/libunwind_i.h')
-rw-r--r--include/libunwind_i.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/libunwind_i.h b/include/libunwind_i.h
index 333ee378..a8186015 100644
--- a/include/libunwind_i.h
+++ b/include/libunwind_i.h
@@ -178,18 +178,25 @@ typedef sigset_t intrmask_t;
extern intrmask_t unwi_full_mask;
+#if defined(CONFIG_BLOCK_SIGNALS)
+# define SIGPROCMASK(how, old_mask, new_mask) \
+ sigprocmask((how), (old_mask), (new_mask))
+#else
+# define SIGPROCMASK(how, old_mask, new_mask) /**/
+#endif
+
#define define_lock(name) \
pthread_mutex_t name = PTHREAD_MUTEX_INITIALIZER
#define lock_init(l) mutex_init (l)
#define lock_acquire(l,m) \
do { \
- sigprocmask (SIG_SETMASK, &unwi_full_mask, &(m)); \
+ SIGPROCMASK (SIG_SETMASK, &unwi_full_mask, &(m)); \
mutex_lock (l); \
} while (0)
#define lock_release(l,m) \
do { \
mutex_unlock (l); \
- sigprocmask (SIG_SETMASK, &(m), NULL); \
+ SIGPROCMASK (SIG_SETMASK, &(m), NULL); \
} while (0)
#define SOS_MEMORY_SIZE 16384 /* see src/mi/mempool.c */