5 /* Android is not a true Linux ;-) */
11 #define LIBC_NAME "libc.so.6"
15 #define LIBC_NAME "libSystem.dylib"
19 #define LIBC_NAME "libc.so"
23 * On Darwin sigset manipulation functions are redefined as macros, so they are slightly renamed here.
24 * However they still present in libc as normal functions.
26 struct KernelInterface
28 int (*raise
)(int sig
);
29 int (*sigprocmask
)(int how
, const sigset_t
*set
, sigset_t
*oldset
);
30 int (*sigsuspend
)(const sigset_t
*mask
);
31 int (*sigaction
)(int signum
, const struct sigaction
*act
, struct sigaction
*oldact
);
32 int (*mprotect
)(const void *addr
, size_t len
, int prot
);
33 ssize_t (*read
)(int fd
, void *buf
, size_t count
);
34 int (*fcntl
)(int fd
, int cmd
, ...);
35 void * (*mmap
)(void *addr
, size_t length
, int prot
, int flags
, int fd
, off_t offset
);
36 int (*munmap
)(void *addr
, size_t length
);
37 int *(*__error
)(void);
38 #ifdef HOST_OS_android
39 int (*sigwait
)(const sigset_t
*restrict set
, int *restrict sig
);
41 int (*SigEmptySet
)(sigset_t
*set
);
42 int (*SigFillSet
)(sigset_t
*set
);
43 int (*SigAddSet
)(sigset_t
*set
, int signum
);
44 int (*SigDelSet
)(sigset_t
*set
, int signum
);
49 * Android's Bionic doesn't have these functions.
50 * They are simply inlined in headers.
52 #ifdef HOST_OS_android
53 #define SIGEMPTYSET sigemptyset
54 #define SIGFILLSET sigfillset
55 #define SIGADDSET sigaddset
56 #define SIGDELSET sigdelset
58 #define SIGEMPTYSET(x) pd->iface->SigEmptySet(x); AROS_HOST_BARRIER
59 #define SIGFILLSET(x) pd->iface->SigFillSet(x); AROS_HOST_BARRIER
60 #define SIGADDSET(x,s) pd->iface->SigAddSet(x,s); AROS_HOST_BARRIER
61 #define SIGDELSET(x,s) pd->iface->SigDelSet(x,s); AROS_HOST_BARRIER
66 sigset_t sig_int_mask
; /* Mask of signals that Disable() block */
68 struct KernelInterface
*iface
;
71 struct SignalTranslation
78 extern struct SignalTranslation
const sigs
[];
80 void cpu_DispatchContext(struct Task
*task
, regs_t
*regs
, struct PlatformData
*pdata
);