X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/b0d623f7f2ae71ed96e60569f61f9a9a27016e80..490019cf9519204c5fb36b2fba54ceb983bb6b72:/bsd/sys/signalvar.h?ds=sidebyside diff --git a/bsd/sys/signalvar.h b/bsd/sys/signalvar.h index 69ff9e15c..6d8488807 100644 --- a/bsd/sys/signalvar.h +++ b/bsd/sys/signalvar.h @@ -104,9 +104,9 @@ struct sigacts { * values should be non-intersecting with values defined in signal.h, e.g.: * SIG_IGN, SIG_DFL, SIG_ERR, SIG_IGN. */ -#define KERN_SIG_CATCH (void (*)(int))2 -#define KERN_SIG_HOLD (void (*)(int))3 -#define KERN_SIG_WAIT (void (*)(int))4 +#define KERN_SIG_CATCH CAST_USER_ADDR_T(2) +#define KERN_SIG_HOLD CAST_USER_ADDR_T(3) +#define KERN_SIG_WAIT CAST_USER_ADDR_T(4) /* * get signal action for process and signal; currently only for current process @@ -188,21 +188,28 @@ int sigprop[NSIG + 1] = { #define sigcantmask (sigmask(SIGKILL) | sigmask(SIGSTOP)) +#define SIGRESTRICTMASK (sigmask(SIGILL) | sigmask(SIGTRAP) | sigmask(SIGABRT) | \ + sigmask(SIGFPE) | sigmask(SIGBUS) | sigmask(SIGSEGV) | \ + sigmask(SIGSYS)) + +extern unsigned sigrestrict_arg; + /* * Machine-independent functions: */ -int coredump(struct proc *p); + void execsigs(struct proc *p, thread_t thread); void gsignal(int pgid, int sig); -int issignal(struct proc *p); +int issignal_locked(struct proc *p); int CURSIG(struct proc *p); int clear_procsiglist(struct proc *p, int bit, int in_signalstart); int set_procsigmask(struct proc *p, int bit); -void postsig(int sig); -void siginit(struct proc *p) __attribute__((section("__TEXT, initcode"))); +void postsig_locked(int sig); +void siginit(struct proc *p); void trapsignal(struct proc *p, int sig, unsigned code); void pt_setrunnable(struct proc *p); int hassigprop(int sig, int prop); +int setsigvec(proc_t, thread_t, int signum, struct __kern_sigaction *, boolean_t in_sigstart); /* * Machine-dependent functions: @@ -219,9 +226,6 @@ void threadsignal(thread_t sig_actthread, int signum, int thread_issignal(proc_t p, thread_t th, sigset_t mask); void psignal_vfork(struct proc *p, task_t new_task, thread_t thread, int signum); -void psignal_vtalarm(struct proc *); -void psignal_xcpu(struct proc *); -void psignal_sigprof(struct proc *); void signal_setast(thread_t sig_actthread); void pgsigio(pid_t pgid, int signalnum); @@ -230,4 +234,17 @@ int sig_try_locked(struct proc *p); #endif /* BSD_KERNEL_PRIVATE */ + +#ifdef XNU_KERNEL_PRIVATE + +/* Functions exported to Mach as well */ + +#define COREDUMP_IGNORE_ULIMIT 0x0001 /* Ignore the process's core file ulimit. */ +#define COREDUMP_FULLFSYNC 0x0002 /* Run F_FULLFSYNC on the core file's vnode */ + +int coredump(struct proc *p, uint32_t reserve_mb, int coredump_flags); + +#endif /* XNU_KERNEL_PRIVATE */ + + #endif /* !_SYS_SIGNALVAR_H_ */