diff options
author | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
commit | 5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch) | |
tree | b1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/i386/linux/linux_sysvec.c | |
parent | 83e00d4274950d2b531c24692cd123538ffbddb9 (diff) | |
download | FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz |
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
Diffstat (limited to 'sys/i386/linux/linux_sysvec.c')
-rw-r--r-- | sys/i386/linux/linux_sysvec.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index b90ea56..27e3649 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -219,13 +219,14 @@ extern unsigned long linux_sznonrtsigcode; static void linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) { - register struct proc *p = curproc; + register struct thread *td = curthread; + register struct proc *p = td->td_proc; register struct trapframe *regs; struct l_rt_sigframe *fp, frame; int oonstack; PROC_LOCK_ASSERT(p, MA_OWNED); - regs = p->p_frame; + regs = td->td_frame; oonstack = sigonstack(regs->tf_esp); #ifdef DEBUG @@ -335,7 +336,7 @@ linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) * instruction to halt it in its tracks. */ PROC_LOCK(p); - sigexit(p, SIGILL); + sigexit(td, SIGILL); /* NOTREACHED */ } @@ -369,7 +370,8 @@ linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) static void linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) { - register struct proc *p = curproc; + register struct thread *td = curthread; + register struct proc *p = td->td_proc; register struct trapframe *regs; struct l_sigframe *fp, frame; l_sigset_t lmask; @@ -381,7 +383,7 @@ linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) return; } - regs = p->p_frame; + regs = td->td_frame; oonstack = sigonstack(regs->tf_esp); #ifdef DEBUG @@ -468,7 +470,7 @@ linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) * instruction to halt it in its tracks. */ PROC_LOCK(p); - sigexit(p, SIGILL); + sigexit(td, SIGILL); /* NOTREACHED */ } @@ -497,16 +499,17 @@ linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) * a machine fault. */ int -linux_sigreturn(p, args) - struct proc *p; +linux_sigreturn(td, args) + struct thread *td; struct linux_sigreturn_args *args; { + struct proc *p = td->td_proc; struct l_sigframe frame; register struct trapframe *regs; l_sigset_t lmask; int eflags, i; - regs = p->p_frame; + regs = td->td_frame; #ifdef DEBUG if (ldebug(sigreturn)) @@ -592,10 +595,11 @@ linux_sigreturn(p, args) * a machine fault. */ int -linux_rt_sigreturn(p, args) - struct proc *p; +linux_rt_sigreturn(td, args) + struct thread *td; struct linux_rt_sigreturn_args *args; { + struct proc *p = td->td_proc; struct sigaltstack_args sasargs; struct l_ucontext uc; struct l_sigcontext *context; @@ -605,7 +609,7 @@ linux_rt_sigreturn(p, args) int eflags; caddr_t sg = stackgap_init(); - regs = p->p_frame; + regs = td->td_frame; #ifdef DEBUG if (ldebug(rt_sigreturn)) @@ -692,7 +696,7 @@ linux_rt_sigreturn(p, args) #endif sasargs.ss = ss; sasargs.oss = NULL; - (void) sigaltstack(p, &sasargs); + (void) sigaltstack(td, &sasargs); return (EJUSTRETURN); } @@ -740,7 +744,7 @@ exec_linux_imgact_try(imgp) if ((error = exec_shell_imgact(imgp)) == 0) { char *rpath = NULL; - linux_emul_find(imgp->proc, NULL, linux_emul_path, + linux_emul_find(&imgp->proc->p_thread, NULL, linux_emul_path, imgp->interpreter_name, &rpath, 0); if (rpath != imgp->interpreter_name) { int len = strlen(rpath) + 1; |