Merge changes from topic "bionic_signal_platform_headers"
* changes: Move sigrtmin.h into platform headers. Move bionic_macros.h from private to platform.
This commit is contained in:
commit
84d00460df
51 changed files with 57 additions and 51 deletions
|
@ -1808,6 +1808,7 @@ cc_library_headers {
|
|||
"//frameworks:__subpackages__",
|
||||
"//external/perfetto:__subpackages__",
|
||||
"//external/scudo:__subpackages__",
|
||||
"//system/core/debuggerd:__subpackages__",
|
||||
],
|
||||
host_supported: true,
|
||||
recovery_available: true,
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include <signal.h>
|
||||
|
||||
#include "private/sigrtmin.h"
|
||||
#include <platform/bionic/reserved_signals.h>
|
||||
|
||||
int __libc_current_sigrtmin() {
|
||||
return __SIGRTMIN + __SIGRT_RESERVED;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <async_safe/CHECK.h>
|
||||
|
||||
#include "platform/bionic/page.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
//
|
||||
// BionicAllocator is a general purpose allocator designed to provide the same
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "private/ScopedRWLock.h"
|
||||
#include "private/ScopedSignalBlocker.h"
|
||||
#include "private/bionic_globals.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
#include "private/bionic_tls.h"
|
||||
#include "pthread_internal.h"
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "pthread_internal.h"
|
||||
|
||||
#include "private/bionic_defs.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
extern "C" pid_t __bionic_clone(uint32_t flags, void* child_stack, int* parent_tid, void* tls, int* child_tid, int (*fn)(void*), void* arg);
|
||||
extern "C" __noreturn void __exit(int status);
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include <async_safe/log.h>
|
||||
#include <platform/bionic/reserved_signals.h>
|
||||
#include <sys/system_properties.h>
|
||||
|
||||
#include "private/bionic_globals.h"
|
||||
|
@ -168,8 +169,7 @@ __printflike(1, 0) static void fdsan_error(const char* fmt, ...) {
|
|||
ANDROID_FDSAN_ERROR_LEVEL_DISABLED);
|
||||
__BIONIC_FALLTHROUGH;
|
||||
case ANDROID_FDSAN_ERROR_LEVEL_WARN_ALWAYS:
|
||||
// DEBUGGER_SIGNAL
|
||||
inline_raise(__SIGRTMIN + 3, &abort_message);
|
||||
inline_raise(BIONIC_SIGNAL_DEBUGGER, &abort_message);
|
||||
break;
|
||||
|
||||
case ANDROID_FDSAN_ERROR_LEVEL_FATAL:
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
#include "private/ErrnoRestorer.h"
|
||||
#include "private/android_filesystem_config.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
// Generated android_ids array
|
||||
#include "generated_android_ids.h"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <pwd.h>
|
||||
|
||||
#include "private/bionic_lock.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
#include "private/grp_pwd.h"
|
||||
|
||||
class MmapFile {
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
#include "private/bionic_elf_tls.h"
|
||||
#include "private/bionic_globals.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
#include "private/bionic_ssp.h"
|
||||
#include "private/bionic_tls.h"
|
||||
#include "private/KernelArgumentBlock.h"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "private/bionic_call_ifunc_resolver.h"
|
||||
#include "private/bionic_elf_tls.h"
|
||||
#include "private/bionic_globals.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
#include "private/bionic_tls.h"
|
||||
#include "private/KernelArgumentBlock.h"
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <time.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
#if defined(__BIONIC_BUILD_FOR_ANDROID_SUPPORT)
|
||||
#define USE_TLS_SLOT 0
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
#include "private/ErrnoRestorer.h"
|
||||
|
||||
// mmap2(2) is like mmap(2), but the offset is in 4096-byte blocks, not bytes.
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
extern "C" void* __mremap(void*, size_t, size_t, int, void*);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#include <unistd.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
|
|
@ -30,8 +30,9 @@
|
|||
#include <sys/poll.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
#include <platform/bionic/reserved_signals.h>
|
||||
|
||||
#include "private/bionic_time_conversions.h"
|
||||
#include "private/sigrtmin.h"
|
||||
#include "private/SigSetConverter.h"
|
||||
|
||||
extern "C" int __ppoll(pollfd*, unsigned int, timespec*, const sigset64_t*, size_t);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
struct atfork_t {
|
||||
atfork_t* next;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "private/bionic_constants.h"
|
||||
#include "private/bionic_defs.h"
|
||||
#include "private/bionic_globals.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
#include "private/bionic_ssp.h"
|
||||
#include "private/bionic_systrace.h"
|
||||
#include "private/bionic_tls.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
#include "private/ScopedReaddir.h"
|
||||
|
||||
// A smart pointer to the scandir dirent**.
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <sys/param.h>
|
||||
#include <sys/prctl.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
#include "scudo.h"
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <signal.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "private/sigrtmin.h"
|
||||
#include <platform/bionic/reserved_signals.h>
|
||||
|
||||
extern "C" void __restore_rt(void);
|
||||
extern "C" void __restore(void);
|
||||
|
|
|
@ -36,9 +36,10 @@
|
|||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <platform/bionic/reserved_signals.h>
|
||||
|
||||
#include "private/ErrnoRestorer.h"
|
||||
#include "private/SigSetConverter.h"
|
||||
#include "private/sigrtmin.h"
|
||||
|
||||
extern "C" int __rt_sigpending(const sigset64_t*, size_t);
|
||||
extern "C" int __rt_sigqueueinfo(pid_t, int, siginfo_t*);
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "private/sigrtmin.h"
|
||||
#include <platform/bionic/reserved_signals.h>
|
||||
|
||||
#include "private/SigSetConverter.h"
|
||||
|
||||
extern "C" int __rt_sigprocmask(int, const sigset64_t*, sigset64_t*, size_t);
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#include <async_safe/CHECK.h>
|
||||
|
||||
#include "private/bionic_defs.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
#include "private/ScopedFd.h"
|
||||
|
||||
static const char property_service_socket[] = "/dev/socket/" PROP_SERVICE_NAME;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
|
||||
#include "Config.h"
|
||||
#include "debug_log.h"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
|
||||
#include "Config.h"
|
||||
#include "GuardData.h"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
|
||||
#include "OptionData.h"
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
|
||||
struct MapEntry {
|
||||
MapEntry(uintptr_t start, uintptr_t end, uintptr_t offset, const char* name, size_t name_len, int flags)
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#include <android-base/stringprintf.h>
|
||||
#include <android-base/thread_annotations.h>
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
|
||||
#include "Config.h"
|
||||
#include "DebugData.h"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
#include <unwindstack/LocalUnwinder.h>
|
||||
|
||||
#include "OptionData.h"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
|
||||
class RecordEntry {
|
||||
public:
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
|
||||
// =============================================================================
|
||||
// Used to disable the debug allocation calls.
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <android-base/stringprintf.h>
|
||||
#include <android-base/strings.h>
|
||||
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
#include <private/bionic_malloc_dispatch.h>
|
||||
|
||||
#include "Config.h"
|
||||
|
|
|
@ -32,13 +32,13 @@
|
|||
|
||||
#include <signal.h>
|
||||
|
||||
#include "bionic_macros.h"
|
||||
#include "macros.h"
|
||||
|
||||
// Realtime signals reserved for internal use:
|
||||
// 32 (__SIGRTMIN + 0) POSIX timers
|
||||
// 33 (__SIGRTMIN + 1) libbacktrace
|
||||
// 34 (__SIGRTMIN + 2) libcore
|
||||
// 35 (__SIGRTMIN + 3) debuggerd -b
|
||||
// 35 (__SIGRTMIN + 3) debuggerd
|
||||
// 36 (__SIGRTMIN + 4) heapprofd native dumps
|
||||
// 37 (__SIGRTMIN + 5) coverage (libprofile-extras)
|
||||
// 38 (__SIGRTMIN + 6) heapprofd ART managed heap dumps
|
||||
|
@ -46,6 +46,8 @@
|
|||
// If you change this, also change __ndk_legacy___libc_current_sigrtmin
|
||||
// in <android/legacy_signal_inlines.h> to match.
|
||||
|
||||
#define BIONIC_SIGNAL_DEBUGGER __SIGRTMIN + 3
|
||||
|
||||
#define __SIGRT_RESERVED 7
|
||||
static inline __always_inline sigset64_t filter_reserved_signals(sigset64_t sigset, int how) {
|
||||
int (*block)(sigset64_t*, int);
|
|
@ -20,7 +20,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include "platform/bionic/page.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
constexpr unsigned kLibraryAlignmentBits = 18;
|
||||
constexpr size_t kLibraryAlignment = 1UL << kLibraryAlignmentBits;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <errno.h>
|
||||
|
||||
#include "bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
class ErrnoRestorer {
|
||||
public:
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <stdint.h>
|
||||
#include <sys/auxv.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
// When the kernel starts the dynamic linker, it passes a pointer to a block
|
||||
// of memory containing argc, the argv array, the environment variable array,
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
|
||||
class MallocXmlElem {
|
||||
public:
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
#include "private/ErrnoRestorer.h"
|
||||
|
||||
class ScopedFd final {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <pthread.h>
|
||||
|
||||
#include "bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
class ScopedPthreadMutexLocker {
|
||||
public:
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <pthread.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
template <bool write> class ScopedRWLock {
|
||||
public:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <dirent.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
class ScopedReaddir {
|
||||
public:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <signal.h>
|
||||
|
||||
#include "bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
class ScopedSignalBlocker {
|
||||
public:
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <async_safe/log.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
template <typename T>
|
||||
union WriteProtectedContents {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <stdatomic.h>
|
||||
#include "private/bionic_futex.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
// Lock is used in places like pthread_rwlock_t, which can be initialized without calling
|
||||
// an initialization function. So make sure Lock can be initialized by setting its memory to 0.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
// Tracing class for bionic. To begin a trace at a specified point:
|
||||
// ScopedTrace("Trace message");
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include <platform/bionic/tls.h>
|
||||
|
||||
#include "bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
#include "grp_pwd.h"
|
||||
|
||||
/** WARNING WARNING WARNING
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include <unistd.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
|
||||
#include "fvwrite.h"
|
||||
#include "gdtoa.h"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#include <private/bionic_ctype.h>
|
||||
#include <private/bionic_fortify.h>
|
||||
#include <private/bionic_macros.h>
|
||||
#include <platform/bionic/macros.h>
|
||||
#include <private/bionic_mbstate.h>
|
||||
|
||||
#define BUF 513 /* Maximum length of numeric string. */
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
#include "prop_info.h"
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <stdint.h>
|
||||
#include <sys/system_properties.h>
|
||||
|
||||
#include "private/bionic_macros.h"
|
||||
#include "platform/bionic/macros.h"
|
||||
|
||||
// The C11 standard doesn't allow atomic loads from const fields,
|
||||
// though C++11 does. Fudge it until standards get straightened out.
|
||||
|
|
Loading…
Reference in a new issue