aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_thr.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2010-06-29 20:41:52 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2010-06-29 20:41:52 +0000
commitad6eec7b9eb5b6bd0b2c9ec29dbb73306a56c571 (patch)
tree4e3cc4d678f3bc1966b6606a03a75aeccdb05be4 /sys/kern/kern_thr.c
parentcfbcffa2480b03e960fcfe64359c68a6929f8d02 (diff)
downloadsrc-ad6eec7b9eb5b6bd0b2c9ec29dbb73306a56c571.tar.gz
src-ad6eec7b9eb5b6bd0b2c9ec29dbb73306a56c571.zip
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
Notes
Notes: svn path=/head/; revision=209592
Diffstat (limited to 'sys/kern/kern_thr.c')
-rw-r--r--sys/kern/kern_thr.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index 0b90dfc34067..d8f7a8eb0f8d 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -326,7 +326,7 @@ thr_kill(struct thread *td, struct thr_kill_args *uap)
error = 0;
if (uap->sig == 0)
break;
- tdsignal(p, ttd, uap->sig, &ksi);
+ tdksignal(ttd, uap->sig, &ksi);
}
}
}
@@ -342,7 +342,7 @@ thr_kill(struct thread *td, struct thr_kill_args *uap)
else if (!_SIG_VALID(uap->sig))
error = EINVAL;
else
- tdsignal(p, ttd, uap->sig, &ksi);
+ tdksignal(ttd, uap->sig, &ksi);
}
PROC_UNLOCK(p);
return (error);
@@ -384,8 +384,7 @@ thr_kill2(struct thread *td, struct thr_kill2_args *uap)
error = 0;
if (uap->sig == 0)
break;
- tdsignal(p, ttd, uap->sig,
- &ksi);
+ tdksignal(ttd, uap->sig, &ksi);
}
}
}
@@ -401,7 +400,7 @@ thr_kill2(struct thread *td, struct thr_kill2_args *uap)
else if (!_SIG_VALID(uap->sig))
error = EINVAL;
else
- tdsignal(p, ttd, uap->sig, &ksi);
+ tdksignal(ttd, uap->sig, &ksi);
}
}
PROC_UNLOCK(p);