-/* $OpenBSD: uipc_socket2.c,v 1.81 2017/07/04 12:51:18 mpi Exp $ */
+/* $OpenBSD: uipc_socket2.c,v 1.82 2017/07/04 12:52:48 mpi Exp $ */
/* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */
/*
void
soisconnecting(struct socket *so)
{
-
+ soassertlocked(so);
so->so_state &= ~(SS_ISCONNECTED|SS_ISDISCONNECTING);
so->so_state |= SS_ISCONNECTING;
}
{
struct socket *head = so->so_head;
+ soassertlocked(so);
so->so_state &= ~(SS_ISCONNECTING|SS_ISDISCONNECTING);
so->so_state |= SS_ISCONNECTED;
if (head && soqremque(so, 0)) {
void
soisdisconnecting(struct socket *so)
{
-
+ soassertlocked(so);
so->so_state &= ~SS_ISCONNECTING;
so->so_state |= (SS_ISDISCONNECTING|SS_CANTRCVMORE|SS_CANTSENDMORE);
wakeup(&so->so_timeo);
void
soisdisconnected(struct socket *so)
{
-
+ soassertlocked(so);
so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING);
so->so_state |= (SS_CANTRCVMORE|SS_CANTSENDMORE|SS_ISDISCONNECTED);
wakeup(&so->so_timeo);
void
socantsendmore(struct socket *so)
{
-
+ soassertlocked(so);
so->so_state |= SS_CANTSENDMORE;
sowwakeup(so);
}
void
socantrcvmore(struct socket *so)
{
-
+ soassertlocked(so);
so->so_state |= SS_CANTRCVMORE;
sorwakeup(so);
}