diff options
author | alfred <alfred@FreeBSD.org> | 2002-05-01 20:44:46 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-05-01 20:44:46 +0000 |
commit | 798c53d495a4eb1c10dc65a1d2ca87e2cb12f8df (patch) | |
tree | 47fe7acf6ad89bf88d96ff3e57b5a8e31207cbf6 /sys/netinet/accf_data.c | |
parent | 97feabed08c26b8c53c3d7fd222d27f5c7433f82 (diff) | |
download | FreeBSD-src-798c53d495a4eb1c10dc65a1d2ca87e2cb12f8df.zip FreeBSD-src-798c53d495a4eb1c10dc65a1d2ca87e2cb12f8df.tar.gz |
Redo the sigio locking.
Turn the sigio sx into a mutex.
Sigio lock is really only needed to protect interrupts from dereferencing
the sigio pointer in an object when the sigio itself is being destroyed.
In order to do this in the most unintrusive manner change pgsigio's
sigio * argument into a **, that way we can lock internally to the
function.
Diffstat (limited to 'sys/netinet/accf_data.c')
-rw-r--r-- | sys/netinet/accf_data.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/netinet/accf_data.c b/sys/netinet/accf_data.c index dd710e6..46c92e3 100644 --- a/sys/netinet/accf_data.c +++ b/sys/netinet/accf_data.c @@ -30,11 +30,9 @@ #include <sys/param.h> #include <sys/kernel.h> -#include <sys/lock.h> #include <sys/sysctl.h> #include <sys/signalvar.h> #include <sys/socketvar.h> -#include <sys/sx.h> /* accept filter that holds a socket until data arrives */ @@ -59,15 +57,11 @@ static void sohasdata(struct socket *so, void *arg, int waitflag) { - SIGIO_SLOCK(); - if (!soreadable(so)) { - SIGIO_SUNLOCK(); + if (!soreadable(so)) return; - } so->so_upcall = NULL; so->so_rcv.sb_flags &= ~SB_UPCALL; soisconnected_locked(so); - SIGIO_SUNLOCK(); return; } |