From ebe1ae7747699ab92e5e94a5f3b500098fa86678 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Mon, 25 Mar 2019 22:06:56 -0700 Subject: [PATCH] Reserve realtime signal for libprofile-extras Bug: http://b/128524141 This signal is used by libprofile-extras to trigger flush of gcov coverage data. Test: libprofile-extras in system/extras/toolchain-extras Change-Id: I77dd5b1d67371a9cfaad54ad60254bfb2dd18ba9 --- libc/include/android/legacy_signal_inlines.h | 2 +- libc/private/sigrtmin.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libc/include/android/legacy_signal_inlines.h b/libc/include/android/legacy_signal_inlines.h index 8219759df..5ca9813f3 100644 --- a/libc/include/android/legacy_signal_inlines.h +++ b/libc/include/android/legacy_signal_inlines.h @@ -52,7 +52,7 @@ static __inline int __ndk_legacy___libc_current_sigrtmax() { static __inline int __ndk_legacy___libc_current_sigrtmin() { if (__libc_current_sigrtmin) return __libc_current_sigrtmin(); - return __SIGRTMIN + 5; /* Should match __libc_current_sigrtmin. */ + return __SIGRTMIN + 6; /* Should match __libc_current_sigrtmin. */ } #undef SIGRTMAX diff --git a/libc/private/sigrtmin.h b/libc/private/sigrtmin.h index 67bd86442..d78d98058 100644 --- a/libc/private/sigrtmin.h +++ b/libc/private/sigrtmin.h @@ -40,11 +40,12 @@ // 34 (__SIGRTMIN + 2) libcore // 35 (__SIGRTMIN + 3) debuggerd -b // 36 (__SIGRTMIN + 4) heapprofd +// 37 (__SIGRTMIN + 5) coverage (libprofile-extras) // // If you change this, also change __ndk_legacy___libc_current_sigrtmin // in to match. -#define __SIGRT_RESERVED 5 +#define __SIGRT_RESERVED 6 static inline __always_inline sigset64_t filter_reserved_signals(sigset64_t sigset, int how) { int (*block)(sigset64_t*, int); int (*unblock)(sigset64_t*, int); @@ -70,5 +71,6 @@ static inline __always_inline sigset64_t filter_reserved_signals(sigset64_t sigs unblock(&sigset, __SIGRTMIN + 2); unblock(&sigset, __SIGRTMIN + 3); unblock(&sigset, __SIGRTMIN + 4); + unblock(&sigset, __SIGRTMIN + 5); return sigset; }