diff options
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r-- | sys/compat/svr4/svr4_filio.c | 16 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_ioctl.c | 17 |
2 files changed, 10 insertions, 23 deletions
diff --git a/sys/compat/svr4/svr4_filio.c b/sys/compat/svr4/svr4_filio.c index 5527716..ef9b8b6 100644 --- a/sys/compat/svr4/svr4_filio.c +++ b/sys/compat/svr4/svr4_filio.c @@ -116,17 +116,15 @@ svr4_sys_read(td, uap) if (fp->f_type == DTYPE_SOCKET) { so = (struct socket *)fp->f_data; - SOCK_LOCK(so); - so_state = so->so_state; -#if defined(GROTTY_READ_HACK) - so->so_state &= ~SS_NBIO; -#endif - SOCK_UNLOCK(so); DPRINTF(("fd %d is a socket\n", SCARG(uap, fd))); - if (so_state & SS_ASYNC) { + if (so->so_state & SS_ASYNC) { DPRINTF(("fd %d is an ASYNC socket!\n", SCARG(uap, fd))); } - DPRINTF(("Here are its flags: 0x%x\n", so_state)); + DPRINTF(("Here are its flags: 0x%x\n", so->so_state)); +#if defined(GROTTY_READ_HACK) + so_state = so->so_state; + so->so_state &= ~SS_NBIO; +#endif } rv = read(td, &ra); @@ -142,9 +140,7 @@ svr4_sys_read(td, uap) #if defined(GROTTY_READ_HACK) if (so) { /* We've already checked to see if this is a socket */ - SOCK_LOCK(so); so->so_state = so_state; - SOCK_UNLOCK(so); } #endif fdrop(fp, td); diff --git a/sys/compat/svr4/svr4_ioctl.c b/sys/compat/svr4/svr4_ioctl.c index d84e89c..50d28ee 100644 --- a/sys/compat/svr4/svr4_ioctl.c +++ b/sys/compat/svr4/svr4_ioctl.c @@ -29,12 +29,10 @@ */ #include <sys/param.h> -#include <sys/fcntl.h> +#include <sys/proc.h> #include <sys/file.h> #include <sys/filedesc.h> -#include <sys/lock.h> -#include <sys/proc.h> -#include <sys/mutex.h> +#include <sys/fcntl.h> #include <sys/socket.h> #include <sys/socketvar.h> #include <sys/systm.h> @@ -95,7 +93,6 @@ svr4_sys_ioctl(td, uap) char c; int num; int argsiz; - int sostate; svr4_decode_cmd(SCARG(uap, com), dir, &c, &num, &argsiz); @@ -116,10 +113,7 @@ svr4_sys_ioctl(td, uap) #if defined(DEBUG_SVR4) if (fp->f_type == DTYPE_SOCKET) { struct socket *so = (struct socket *)fp->f_data; - SOCK_LOCK(so); - sostate = so->so_state; - SOCK_UNLOCK(so); - DPRINTF(("<<< IN: so_state = 0x%x\n", sostate)); + DPRINTF(("<<< IN: so_state = 0x%x\n", so->so_state)); } #endif @@ -164,10 +158,7 @@ svr4_sys_ioctl(td, uap) struct socket *so; so = (struct socket *)fp->f_data; - SOCK_LOCK(so); - sostate = so->so_state; - SOCK_UNLOCK(so); - DPRINTF((">>> OUT: so_state = 0x%x\n", sostate)); + DPRINTF((">>> OUT: so_state = 0x%x\n", so->so_state)); } #endif error = (*fun)(fp, td, retval, SCARG(uap, fd), cmd, SCARG(uap, data)); |