sigset_t ps_siginfo; /* signals that want SA_SIGINFO args */
sigset_t ps_oldmask; /* saved mask from before sigpause */
int ps_flags; /* signal flags, below */
- struct user_sigaltstack ps_sigstk; /* sp, length & flags */
+ struct kern_sigaltstack ps_sigstk; /* sp, length & flags */
int ps_sig; /* for core dump/debugger XXX */
int ps_code; /* for core dump/debugger XXX */
int ps_addr; /* for core dump/debugger XXX */
#define KERN_SIG_HOLD (void (*)(int))3
#define KERN_SIG_WAIT (void (*)(int))4
-#define pgsigio(pgid, sig, notused) \
- { \
- struct proc *p; \
- if (pgid < 0) \
- gsignal(-(pgid), sig);\
- else if (pgid > 0 && (p = pfind(pgid)) != 0) \
- psignal(p, sig); \
-}
-
/*
* get signal action for process and signal; currently only for current process
*/
#define SHOULDissignal(p,uthreadp) \
(((uthreadp)->uu_siglist) \
& ~((((uthreadp)->uu_sigmask) \
- | (((p)->p_flag & P_TRACED) ? 0 : (p)->p_sigignore)) \
+ | (((p)->p_lflag & P_LTRACED) ? 0 : (p)->p_sigignore)) \
& ~sigcantmask))
/*
/*
* Machine-independent functions:
*/
-int signal_lock(struct proc *);
-int signal_unlock(struct proc *);
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 CURSIG(struct proc *p);
-int clear_procsiglist(struct proc *p, int bit);
-int clear_procsigmask(struct proc *p, int bit);
+int clear_procsiglist(struct proc *p, int bit, int in_signalstart);
int set_procsigmask(struct proc *p, int bit);
-void tty_pgsignal(struct pgrp *pgrp, int sig);
void postsig(int sig);
-void siginit(struct proc *p);
+void siginit(struct proc *p) __attribute__((section("__TEXT, initcode")));
void trapsignal(struct proc *p, int sig, unsigned code);
void pt_setrunnable(struct proc *p);
+int hassigprop(int sig, int prop);
/*
* Machine-dependent functions:
*/
void sendsig(struct proc *, /*sig_t*/ user_addr_t action, int sig,
- int returnmask, u_long code);
+ int returnmask, uint32_t code);
void psignal(struct proc *p, int sig);
+void psignal_locked(struct proc *, int);
void pgsignal(struct pgrp *pgrp, int sig, int checkctty);
-void threadsignal(thread_t sig_actthread, int signum, u_long code);
+void tty_pgsignal(struct tty * tp, int sig, int checkctty);
+void threadsignal(thread_t sig_actthread, int signum,
+ mach_exception_code_t code);
int thread_issignal(proc_t p, thread_t th, sigset_t mask);
-void psignal_vfork(struct proc *p, task_t new_task, thread_t thr_act,
+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 psignal_lock(struct proc *, int, int);
void signal_setast(thread_t sig_actthread);
+void pgsigio(pid_t pgid, int signalnum);
-/* XXX not really very "inline"... */
-__inline__ void sig_lock_to_exit(struct proc *p);
-__inline__ int sig_try_locked(struct proc *p);
+void sig_lock_to_exit(struct proc *p);
+int sig_try_locked(struct proc *p);
#endif /* BSD_KERNEL_PRIVATE */