summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortanimura <tanimura@FreeBSD.org>2002-06-18 07:42:02 +0000
committertanimura <tanimura@FreeBSD.org>2002-06-18 07:42:02 +0000
commitcb3347e926b2f55441b5b402a984b3cf1f946ff7 (patch)
treef42aca06eba2e1816711ad9e437466e635000f8f
parentf54b57d4885c98f03395b425fd8092addebf028d (diff)
downloadFreeBSD-src-cb3347e926b2f55441b5b402a984b3cf1f946ff7.zip
FreeBSD-src-cb3347e926b2f55441b5b402a984b3cf1f946ff7.tar.gz
Remove so*_locked(), which were backed out by mistake.
-rw-r--r--sys/kern/uipc_sockbuf.c62
-rw-r--r--sys/kern/uipc_socket2.c62
-rw-r--r--sys/net/rtsock.c2
-rw-r--r--sys/netinet/accf_data.c2
-rw-r--r--sys/netinet/accf_http.c6
-rw-r--r--sys/netinet/tcp_input.c2
-rw-r--r--sys/netinet/tcp_reass.c2
-rw-r--r--sys/netkey/keysock.c2
-rw-r--r--sys/sys/socketvar.h26
9 files changed, 38 insertions, 128 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index c8daa09..a9a4162 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -107,38 +107,6 @@ soisconnecting(so)
}
void
-soisconnected_locked(so)
- struct socket *so;
-{
- struct socket *head = so->so_head;
-
- so->so_state &= ~(SS_ISCONNECTING|SS_ISDISCONNECTING|SS_ISCONFIRMING);
- so->so_state |= SS_ISCONNECTED;
- if (head && (so->so_state & SS_INCOMP)) {
- if ((so->so_options & SO_ACCEPTFILTER) != 0) {
- so->so_upcall = head->so_accf->so_accept_filter->accf_callback;
- so->so_upcallarg = head->so_accf->so_accept_filter_arg;
- so->so_rcv.sb_flags |= SB_UPCALL;
- so->so_options &= ~SO_ACCEPTFILTER;
- so->so_upcall(so, so->so_upcallarg, 0);
- return;
- }
- TAILQ_REMOVE(&head->so_incomp, so, so_list);
- head->so_incqlen--;
- so->so_state &= ~SS_INCOMP;
- TAILQ_INSERT_TAIL(&head->so_comp, so, so_list);
- head->so_qlen++;
- so->so_state |= SS_COMP;
- sorwakeup_locked(head);
- wakeup_one(&head->so_timeo);
- } else {
- wakeup(&so->so_timeo);
- sorwakeup_locked(so);
- sowwakeup_locked(so);
- }
-}
-
-void
soisconnected(so)
struct socket *so;
{
@@ -161,12 +129,12 @@ soisconnected(so)
TAILQ_INSERT_TAIL(&head->so_comp, so, so_list);
head->so_qlen++;
so->so_state |= SS_COMP;
- sorwakeup_locked(head);
+ sorwakeup(head);
wakeup_one(&head->so_timeo);
} else {
wakeup(&so->so_timeo);
- sorwakeup_locked(so);
- sowwakeup_locked(so);
+ sorwakeup(so);
+ sowwakeup(so);
}
}
@@ -178,28 +146,20 @@ soisdisconnecting(so)
so->so_state &= ~SS_ISCONNECTING;
so->so_state |= (SS_ISDISCONNECTING|SS_CANTRCVMORE|SS_CANTSENDMORE);
wakeup((caddr_t)&so->so_timeo);
- sowwakeup_locked(so);
- sorwakeup_locked(so);
+ sowwakeup(so);
+ sorwakeup(so);
}
void
-soisdisconnected_locked(so)
+soisdisconnected(so)
register struct socket *so;
{
so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING);
so->so_state |= (SS_CANTRCVMORE|SS_CANTSENDMORE|SS_ISDISCONNECTED);
wakeup((caddr_t)&so->so_timeo);
- sowwakeup_locked(so);
- sorwakeup_locked(so);
-}
-
-void
-soisdisconnected(so)
- register struct socket *so;
-{
-
- soisdisconnected_locked(so);
+ sowwakeup(so);
+ sorwakeup(so);
}
/*
@@ -255,7 +215,7 @@ sonewconn(head, connstatus)
head->so_incqlen++;
}
if (connstatus) {
- sorwakeup_locked(head);
+ sorwakeup(head);
wakeup((caddr_t)&head->so_timeo);
so->so_state |= connstatus;
}
@@ -278,7 +238,7 @@ socantsendmore(so)
{
so->so_state |= SS_CANTSENDMORE;
- sowwakeup_locked(so);
+ sowwakeup(so);
}
void
@@ -287,7 +247,7 @@ socantrcvmore(so)
{
so->so_state |= SS_CANTRCVMORE;
- sorwakeup_locked(so);
+ sorwakeup(so);
}
/*
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index c8daa09..a9a4162 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -107,38 +107,6 @@ soisconnecting(so)
}
void
-soisconnected_locked(so)
- struct socket *so;
-{
- struct socket *head = so->so_head;
-
- so->so_state &= ~(SS_ISCONNECTING|SS_ISDISCONNECTING|SS_ISCONFIRMING);
- so->so_state |= SS_ISCONNECTED;
- if (head && (so->so_state & SS_INCOMP)) {
- if ((so->so_options & SO_ACCEPTFILTER) != 0) {
- so->so_upcall = head->so_accf->so_accept_filter->accf_callback;
- so->so_upcallarg = head->so_accf->so_accept_filter_arg;
- so->so_rcv.sb_flags |= SB_UPCALL;
- so->so_options &= ~SO_ACCEPTFILTER;
- so->so_upcall(so, so->so_upcallarg, 0);
- return;
- }
- TAILQ_REMOVE(&head->so_incomp, so, so_list);
- head->so_incqlen--;
- so->so_state &= ~SS_INCOMP;
- TAILQ_INSERT_TAIL(&head->so_comp, so, so_list);
- head->so_qlen++;
- so->so_state |= SS_COMP;
- sorwakeup_locked(head);
- wakeup_one(&head->so_timeo);
- } else {
- wakeup(&so->so_timeo);
- sorwakeup_locked(so);
- sowwakeup_locked(so);
- }
-}
-
-void
soisconnected(so)
struct socket *so;
{
@@ -161,12 +129,12 @@ soisconnected(so)
TAILQ_INSERT_TAIL(&head->so_comp, so, so_list);
head->so_qlen++;
so->so_state |= SS_COMP;
- sorwakeup_locked(head);
+ sorwakeup(head);
wakeup_one(&head->so_timeo);
} else {
wakeup(&so->so_timeo);
- sorwakeup_locked(so);
- sowwakeup_locked(so);
+ sorwakeup(so);
+ sowwakeup(so);
}
}
@@ -178,28 +146,20 @@ soisdisconnecting(so)
so->so_state &= ~SS_ISCONNECTING;
so->so_state |= (SS_ISDISCONNECTING|SS_CANTRCVMORE|SS_CANTSENDMORE);
wakeup((caddr_t)&so->so_timeo);
- sowwakeup_locked(so);
- sorwakeup_locked(so);
+ sowwakeup(so);
+ sorwakeup(so);
}
void
-soisdisconnected_locked(so)
+soisdisconnected(so)
register struct socket *so;
{
so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING);
so->so_state |= (SS_CANTRCVMORE|SS_CANTSENDMORE|SS_ISDISCONNECTED);
wakeup((caddr_t)&so->so_timeo);
- sowwakeup_locked(so);
- sorwakeup_locked(so);
-}
-
-void
-soisdisconnected(so)
- register struct socket *so;
-{
-
- soisdisconnected_locked(so);
+ sowwakeup(so);
+ sorwakeup(so);
}
/*
@@ -255,7 +215,7 @@ sonewconn(head, connstatus)
head->so_incqlen++;
}
if (connstatus) {
- sorwakeup_locked(head);
+ sorwakeup(head);
wakeup((caddr_t)&head->so_timeo);
so->so_state |= connstatus;
}
@@ -278,7 +238,7 @@ socantsendmore(so)
{
so->so_state |= SS_CANTSENDMORE;
- sowwakeup_locked(so);
+ sowwakeup(so);
}
void
@@ -287,7 +247,7 @@ socantrcvmore(so)
{
so->so_state |= SS_CANTRCVMORE;
- sorwakeup_locked(so);
+ sorwakeup(so);
}
/*
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 47031c2..d9c2316 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -147,7 +147,7 @@ rts_attach(struct socket *so, int proto, struct thread *td)
}
rp->rcb_faddr = &route_src;
route_cb.any_count++;
- soisconnected_locked(so);
+ soisconnected(so);
so->so_options |= SO_USELOOPBACK;
splx(s);
return 0;
diff --git a/sys/netinet/accf_data.c b/sys/netinet/accf_data.c
index 46c92e3..2058b06 100644
--- a/sys/netinet/accf_data.c
+++ b/sys/netinet/accf_data.c
@@ -62,6 +62,6 @@ sohasdata(struct socket *so, void *arg, int waitflag)
so->so_upcall = NULL;
so->so_rcv.sb_flags &= ~SB_UPCALL;
- soisconnected_locked(so);
+ soisconnected(so);
return;
}
diff --git a/sys/netinet/accf_http.c b/sys/netinet/accf_http.c
index 4a3e17e..686e563 100644
--- a/sys/netinet/accf_http.c
+++ b/sys/netinet/accf_http.c
@@ -203,7 +203,7 @@ fallout:
DPRINT("fallout");
so->so_upcall = NULL;
so->so_rcv.sb_flags &= ~SB_UPCALL;
- soisconnected_locked(so);
+ soisconnected(so);
return;
}
@@ -285,7 +285,7 @@ fallout:
DPRINT("fallout");
so->so_upcall = NULL;
so->so_rcv.sb_flags &= ~SB_UPCALL;
- soisconnected_locked(so);
+ soisconnected(so);
return;
}
@@ -355,6 +355,6 @@ readmore:
gotit:
so->so_upcall = NULL;
so->so_rcv.sb_flags &= ~SB_UPCALL;
- soisconnected_locked(so);
+ soisconnected(so);
return;
}
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 68f9bc6..95d21ce 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1871,7 +1871,7 @@ process_ACK:
* we'll hang forever.
*/
if (so->so_state & SS_CANTRCVMORE) {
- soisdisconnected_locked(so);
+ soisdisconnected(so);
callout_reset(tp->tt_2msl, tcp_maxidle,
tcp_timer_2msl, tp);
}
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 68f9bc6..95d21ce 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -1871,7 +1871,7 @@ process_ACK:
* we'll hang forever.
*/
if (so->so_state & SS_CANTRCVMORE) {
- soisdisconnected_locked(so);
+ soisdisconnected(so);
callout_reset(tp->tt_2msl, tcp_maxidle,
tcp_timer_2msl, tp);
}
diff --git a/sys/netkey/keysock.c b/sys/netkey/keysock.c
index 68f1045..1bf62de 100644
--- a/sys/netkey/keysock.c
+++ b/sys/netkey/keysock.c
@@ -427,7 +427,7 @@ key_attach(struct socket *so, int proto, struct thread *td)
key_cb.any_count++;
kp->kp_raw.rcb_laddr = &key_src;
kp->kp_raw.rcb_faddr = &key_dst;
- soisconnected_locked(so);
+ soisconnected(so);
so->so_options |= SO_USELOOPBACK;
splx(s);
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
index f4da0d3..ca47e57 100644
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -276,23 +276,15 @@ struct xsocket {
sofree(so); \
} while(0)
-#define sorwakeup_locked(so) do { \
- if (sb_notify(&(so)->so_rcv)) \
- sowakeup((so), &(so)->so_rcv); \
- } while (0)
-
-#define sorwakeup(so) do { \
- sorwakeup_locked(so); \
- } while (0)
-
-#define sowwakeup_locked(so) do { \
- if (sb_notify(&(so)->so_snd)) \
- sowakeup((so), &(so)->so_snd); \
- } while (0)
+#define sorwakeup(so) do { \
+ if (sb_notify(&(so)->so_rcv)) \
+ sowakeup((so), &(so)->so_rcv); \
+ } while (0)
-#define sowwakeup(so) do { \
- sowwakeup_locked(so); \
- } while (0)
+#define sowwakeup(so) do { \
+ if (sb_notify(&(so)->so_snd)) \
+ sowakeup((so), &(so)->so_snd); \
+ } while (0)
#ifdef _KERNEL
@@ -402,14 +394,12 @@ int soconnect2(struct socket *so1, struct socket *so2);
int socreate(int dom, struct socket **aso, int type, int proto,
struct ucred *cred, struct thread *td);
int sodisconnect(struct socket *so);
-void soisconnected_locked(struct socket *so);
void sofree(struct socket *so);
int sogetopt(struct socket *so, struct sockopt *sopt);
void sohasoutofband(struct socket *so);
void soisconnected(struct socket *so);
void soisconnecting(struct socket *so);
void soisdisconnected(struct socket *so);
-void soisdisconnected_locked(struct socket *so);
void soisdisconnecting(struct socket *so);
int solisten(struct socket *so, int backlog, struct thread *td);
struct socket *
OpenPOWER on IntegriCloud