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/compat/svr4/svr4_filio.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/compat/svr4/svr4_filio.c')
-rw-r--r-- | sys/compat/svr4/svr4_filio.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/sys/compat/svr4/svr4_filio.c b/sys/compat/svr4/svr4_filio.c index c467dad..8d24788 100644 --- a/sys/compat/svr4/svr4_filio.c +++ b/sys/compat/svr4/svr4_filio.c @@ -51,8 +51,8 @@ /*#define GROTTY_READ_HACK*/ int -svr4_sys_poll(p, uap) - struct proc *p; +svr4_sys_poll(td, uap) + struct thread *td; struct svr4_sys_poll_args *uap; { int error; @@ -68,7 +68,7 @@ svr4_sys_poll(p, uap) siz = SCARG(uap, nfds) * sizeof(struct pollfd); pfd = (struct pollfd *)malloc(siz, M_TEMP, M_WAITOK); - error = poll(p, (struct poll_args *)uap); + error = poll(td, (struct poll_args *)uap); if ((cerr = copyin(SCARG(uap, fds), pfd, siz)) != 0) { error = cerr; @@ -92,12 +92,12 @@ done: #if defined(READ_TEST) int -svr4_sys_read(p, uap) - struct proc *p; +svr4_sys_read(td, uap) + struct thread *td; struct svr4_sys_read_args *uap; { struct read_args ra; - struct filedesc *fdp = p->p_fd; + struct filedesc *fdp = td->td_proc->p_fd; struct file *fp; struct socket *so = NULL; int so_state; @@ -126,15 +126,15 @@ svr4_sys_read(p, uap) #endif } - rv = read(p, &ra); + rv = read(td, &ra); DPRINTF(("svr4_read(%d, 0x%0x, %d) = %d\n", SCARG(uap, fd), SCARG(uap, buf), SCARG(uap, nbyte), rv)); if (rv == EAGAIN) { - DPRINTF(("sigmask = 0x%x\n", p->p_sigmask)); - DPRINTF(("sigignore = 0x%x\n", p->p_sigignore)); - DPRINTF(("sigcaught = 0x%x\n", p->p_sigcatch)); - DPRINTF(("siglist = 0x%x\n", p->p_siglist)); + DPRINTF(("sigmask = 0x%x\n", td->td_proc->p_sigmask)); + DPRINTF(("sigignore = 0x%x\n", td->td_proc->p_sigignore)); + DPRINTF(("sigcaught = 0x%x\n", td->td_proc->p_sigcatch)); + DPRINTF(("siglist = 0x%x\n", td->td_proc->p_siglist)); } #if defined(GROTTY_READ_HACK) @@ -149,8 +149,8 @@ svr4_sys_read(p, uap) #if defined(BOGUS) int -svr4_sys_write(p, uap) - struct proc *p; +svr4_sys_write(td, uap) + struct thread *td; struct svr4_sys_write_args *uap; { struct write_args wa; @@ -162,7 +162,7 @@ svr4_sys_write(p, uap) SCARG(&wa, buf) = SCARG(uap, buf); SCARG(&wa, nbyte) = SCARG(uap, nbyte); - rv = write(p, &wa); + rv = write(td, &wa); DPRINTF(("svr4_write(%d, 0x%0x, %d) = %d\n", SCARG(uap, fd), SCARG(uap, buf), SCARG(uap, nbyte), rv)); @@ -172,9 +172,9 @@ svr4_sys_write(p, uap) #endif /* BOGUS */ int -svr4_fil_ioctl(fp, p, retval, fd, cmd, data) +svr4_fil_ioctl(fp, td, retval, fd, cmd, data) struct file *fp; - struct proc *p; + struct thread *td; register_t *retval; int fd; u_long cmd; @@ -182,7 +182,7 @@ svr4_fil_ioctl(fp, p, retval, fd, cmd, data) { int error; int num; - struct filedesc *fdp = p->p_fd; + struct filedesc *fdp = td->td_proc->p_fd; *retval = 0; @@ -214,7 +214,7 @@ svr4_fil_ioctl(fp, p, retval, fd, cmd, data) #ifdef SVR4_DEBUG if (cmd == FIOASYNC) DPRINTF(("FIOASYNC\n")); #endif - error = fo_ioctl(fp, cmd, (caddr_t) &num, p); + error = fo_ioctl(fp, cmd, (caddr_t) &num, td); if (error) return error; |