diff options
author | Julian Elischer <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
---|---|---|
committer | Julian Elischer <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
commit | b40ce4165d5eb3a5de1515245055350ae3dbab8e (patch) | |
tree | b1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/compat/linux/linux_signal.c | |
parent | 9b36a30ee46a7766f269fe832ef3a2daa2ec04f0 (diff) | |
download | src-b40ce4165d5eb3a5de1515245055350ae3dbab8e.tar.gz src-b40ce4165d5eb3a5de1515245055350ae3dbab8e.zip |
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Notes
Notes:
svn path=/head/; revision=83366
Diffstat (limited to 'sys/compat/linux/linux_signal.c')
-rw-r--r-- | sys/compat/linux/linux_signal.c | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 24a540fbf185..ccc30f0a86e4 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -131,7 +131,7 @@ bsd_to_linux_sigaction(struct sigaction *bsa, l_sigaction_t *lsa) } int -linux_do_sigaction(struct proc *p, int linux_sig, l_sigaction_t *linux_nsa, +linux_do_sigaction(struct thread *td, int linux_sig, l_sigaction_t *linux_nsa, l_sigaction_t *linux_osa) { struct sigaction *nsa, *osa; @@ -163,7 +163,7 @@ linux_do_sigaction(struct proc *p, int linux_sig, l_sigaction_t *linux_nsa, sa_args.act = nsa; sa_args.oact = osa; - error = sigaction(p, &sa_args); + error = sigaction(td, &sa_args); if (error) return (error); @@ -176,7 +176,7 @@ linux_do_sigaction(struct proc *p, int linux_sig, l_sigaction_t *linux_nsa, #ifndef __alpha__ int -linux_signal(struct proc *p, struct linux_signal_args *args) +linux_signal(struct thread *td, struct linux_signal_args *args) { l_sigaction_t nsa, osa; int error; @@ -191,15 +191,15 @@ linux_signal(struct proc *p, struct linux_signal_args *args) nsa.lsa_flags = LINUX_SA_ONESHOT | LINUX_SA_NOMASK; LINUX_SIGEMPTYSET(nsa.lsa_mask); - error = linux_do_sigaction(p, args->sig, &nsa, &osa); - p->p_retval[0] = (int)osa.lsa_handler; + error = linux_do_sigaction(td, args->sig, &nsa, &osa); + td->td_retval[0] = (int)osa.lsa_handler; return (error); } #endif /*!__alpha__*/ int -linux_rt_sigaction(struct proc *p, struct linux_rt_sigaction_args *args) +linux_rt_sigaction(struct thread *td, struct linux_rt_sigaction_args *args) { l_sigaction_t nsa, osa; int error; @@ -220,7 +220,7 @@ linux_rt_sigaction(struct proc *p, struct linux_rt_sigaction_args *args) return (error); } - error = linux_do_sigaction(p, args->sig, + error = linux_do_sigaction(td, args->sig, args->act ? &nsa : NULL, args->oact ? &osa : NULL); @@ -232,14 +232,15 @@ linux_rt_sigaction(struct proc *p, struct linux_rt_sigaction_args *args) } static int -linux_do_sigprocmask(struct proc *p, int how, l_sigset_t *new, +linux_do_sigprocmask(struct thread *td, int how, l_sigset_t *new, l_sigset_t *old) { int error; sigset_t mask; + struct proc *p = td->td_proc; error = 0; - p->p_retval[0] = 0; + td->td_retval[0] = 0; PROC_LOCK(p); if (old != NULL) @@ -272,7 +273,7 @@ linux_do_sigprocmask(struct proc *p, int how, l_sigset_t *new, #ifndef __alpha__ int -linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args) +linux_sigprocmask(struct thread *td, struct linux_sigprocmask_args *args) { l_osigset_t mask; l_sigset_t set, oset; @@ -291,7 +292,7 @@ linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args) set.__bits[0] = mask; } - error = linux_do_sigprocmask(p, args->how, + error = linux_do_sigprocmask(td, args->how, args->mask ? &set : NULL, args->omask ? &oset : NULL); @@ -305,7 +306,7 @@ linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args) #endif /*!__alpha__*/ int -linux_rt_sigprocmask(struct proc *p, struct linux_rt_sigprocmask_args *args) +linux_rt_sigprocmask(struct thread *td, struct linux_rt_sigprocmask_args *args) { l_sigset_t set, oset; int error; @@ -326,7 +327,7 @@ linux_rt_sigprocmask(struct proc *p, struct linux_rt_sigprocmask_args *args) return (error); } - error = linux_do_sigprocmask(p, args->how, + error = linux_do_sigprocmask(td, args->how, args->mask ? &set : NULL, args->omask ? &oset : NULL); @@ -339,8 +340,9 @@ linux_rt_sigprocmask(struct proc *p, struct linux_rt_sigprocmask_args *args) #ifndef __alpha__ int -linux_sgetmask(struct proc *p, struct linux_sgetmask_args *args) +linux_sgetmask(struct thread *td, struct linux_sgetmask_args *args) { + struct proc *p = td->td_proc; l_sigset_t mask; #ifdef DEBUG @@ -351,13 +353,14 @@ linux_sgetmask(struct proc *p, struct linux_sgetmask_args *args) PROC_LOCK(p); bsd_to_linux_sigset(&p->p_sigmask, &mask); PROC_UNLOCK(p); - p->p_retval[0] = mask.__bits[0]; + td->td_retval[0] = mask.__bits[0]; return (0); } int -linux_ssetmask(struct proc *p, struct linux_ssetmask_args *args) +linux_ssetmask(struct thread *td, struct linux_ssetmask_args *args) { + struct proc *p = td->td_proc; l_sigset_t lset; sigset_t bset; @@ -368,7 +371,7 @@ linux_ssetmask(struct proc *p, struct linux_ssetmask_args *args) PROC_LOCK(p); bsd_to_linux_sigset(&p->p_sigmask, &lset); - p->p_retval[0] = lset.__bits[0]; + td->td_retval[0] = lset.__bits[0]; LINUX_SIGEMPTYSET(lset); lset.__bits[0] = args->mask; linux_to_bsd_sigset(&lset, &bset); @@ -379,8 +382,9 @@ linux_ssetmask(struct proc *p, struct linux_ssetmask_args *args) } int -linux_sigpending(struct proc *p, struct linux_sigpending_args *args) +linux_sigpending(struct thread *td, struct linux_sigpending_args *args) { + struct proc *p = td->td_proc; sigset_t bset; l_sigset_t lset; l_osigset_t mask; @@ -401,7 +405,7 @@ linux_sigpending(struct proc *p, struct linux_sigpending_args *args) #endif /*!__alpha__*/ int -linux_kill(struct proc *p, struct linux_kill_args *args) +linux_kill(struct thread *td, struct linux_kill_args *args) { struct kill_args /* { int pid; @@ -427,5 +431,5 @@ linux_kill(struct proc *p, struct linux_kill_args *args) tmp.signum = args->signum; tmp.pid = args->pid; - return (kill(p, &tmp)); + return (kill(td, &tmp)); } |