From df7979cf7647002841f39b7e20cc8fbc4c413545 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 29 Jun 2010 20:41:52 +0000 Subject: Tweak the in-kernel API for sending signals to threads: - Rename tdsignal() to tdsendsignal() and make it private to kern_sig.c. - Add tdsignal() and tdksignal() routines that mirror psignal() and pksignal() except that they accept a thread as an argument instead of a process. They send a signal to a specific thread rather than to an individual process. Reviewed by: kib --- sys/compat/linux/linux_signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/compat/linux/linux_signal.c') diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 9cc05ed9..ca4bda1 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -501,7 +501,7 @@ linux_rt_sigtimedwait(struct thread *td, /* Repost if we got an error. */ if (error && info.ksi_signo) { PROC_LOCK(td->td_proc); - tdsignal(td->td_proc, td, info.ksi_signo, &info); + tdksignal(td, info.ksi_signo, &info); PROC_UNLOCK(td->td_proc); } else td->td_retval[0] = info.ksi_signo; @@ -587,7 +587,7 @@ linux_do_tkill(struct thread *td, l_int tgid, l_int pid, l_int signum) ksi.ksi_pid = proc->p_pid; ksi.ksi_uid = proc->p_ucred->cr_ruid; - error = tdsignal(p, NULL, ksi.ksi_signo, &ksi); + error = pksignal(p, ksi.ksi_signo, &ksi); out: PROC_UNLOCK(p); -- cgit v1.1