diff options
author | Christopher Ferris <cferris@google.com> | 2014-04-29 09:35:30 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2014-04-30 16:32:47 -0700 |
commit | aa63d9f980f95718fc28ca7e222c1e8d7ca9e778 (patch) | |
tree | 98901cf725457fc80c71c6a4bede3fda4e172cb0 /libbacktrace/BacktraceThread.h | |
parent | f3661cc2f124bb7ca38285f156c624dda974b4c5 (diff) | |
download | system_core-aa63d9f980f95718fc28ca7e222c1e8d7ca9e778.zip system_core-aa63d9f980f95718fc28ca7e222c1e8d7ca9e778.tar.gz system_core-aa63d9f980f95718fc28ca7e222c1e8d7ca9e778.tar.bz2 |
Use real time signal for threads instead of SIGURG.
This guarantees that any application is not also using this signal
for some other purpose.
Change-Id: I7c9bbb0ec8bb4e13322ecda951bcd43c6bf6ee1a
Diffstat (limited to 'libbacktrace/BacktraceThread.h')
-rw-r--r-- | libbacktrace/BacktraceThread.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libbacktrace/BacktraceThread.h b/libbacktrace/BacktraceThread.h index 3412d58..9310a44 100644 --- a/libbacktrace/BacktraceThread.h +++ b/libbacktrace/BacktraceThread.h @@ -18,6 +18,7 @@ #define _LIBBACKTRACE_BACKTRACE_THREAD_H #include <inttypes.h> +#include <signal.h> #include <sys/types.h> #include "BacktraceImpl.h" @@ -29,6 +30,14 @@ enum state_e { STATE_CANCEL, }; +// The signal used to cause a thread to dump the stack. +#if defined(__GLIBC__) +// GLIBC reserves __SIGRTMIN signals, so use SIGRTMIN to avoid errors. +#define THREAD_SIGNAL SIGRTMIN +#else +#define THREAD_SIGNAL (__SIGRTMIN+1) +#endif + class BacktraceThreadInterface; struct ThreadEntry { |