| Index: sandbox/linux/system_headers/linux_signal.h
|
| diff --git a/sandbox/linux/system_headers/linux_signal.h b/sandbox/linux/system_headers/linux_signal.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b79980978a2146a3dbd80d89ff618c15a5795c3b
|
| --- /dev/null
|
| +++ b/sandbox/linux/system_headers/linux_signal.h
|
| @@ -0,0 +1,55 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SIGNAL_H_
|
| +#define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SIGNAL_H_
|
| +
|
| +// NOTE: On some toolchains, signal related ABI is incompatible with Linux's.
|
| +// So, here we declare necessary macros, structs and functions in Linux ABI.
|
| +
|
| +#include <stdint.h>
|
| +
|
| +#define LINUX_SIGBUS 7
|
| +#define LINUX_SIGSYS 31
|
| +
|
| +#define LINUX_SIG_BLOCK 0
|
| +#define LINUX_SIG_UNBLOCK 1
|
| +
|
| +#define LINUX_SA_SIGINFO 4
|
| +#define LINUX_SA_NODEFER 0x40000000
|
| +
|
| +#define LINUX_SIG_DFL 0
|
| +
|
| +struct arch_sigsys {
|
| + void* ip;
|
| + int nr;
|
| + unsigned int arch;
|
| +};
|
| +
|
| +typedef struct {
|
| + int si_signo;
|
| + int si_errno;
|
| + int si_code;
|
| + struct {
|
| + struct arch_sigsys _sigsys;
|
| + } _sifields;
|
| +} linux_siginfo_t;
|
| +
|
| +// Linux sigset_t is 64 bits.
|
| +typedef struct {
|
| + uint32_t sig[2];
|
| +} linux_sigset_t;
|
| +
|
| +struct linux_sigaction {
|
| + // Traling '_' is to avoid name confliction defined by some toolchains.
|
| + union {
|
| + void (*sa_handler_)(int);
|
| + void (*sa_sigaction_)(int, linux_siginfo_t*, void*);
|
| + };
|
| + uint32_t sa_flags;
|
| + void (*sa_restorer)(void);
|
| + linux_sigset_t sa_mask;
|
| +};
|
| +
|
| +#endif
|
|
|