FreeBSD/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
/*
 * Close a SDP socket and initiate a friendly disconnect.
 */
Close a SDP socket and initiate a friendly disconnect.
Close a SDP socket and initiate a friendly disconnect .
static void
sdp_close(struct socket *so)
{
	struct sdp_sock *ssk;
	ssk = sdp_sk(so);
	SDP_WLOCK(ssk);
	if (!(ssk->flags & SDP_TIMEWAIT) &&
	    !(ssk->flags & SDP_DROPPED)) 
		sdp_start_disconnect(ssk);
	if (!(ssk->flags & SDP_DROPPED)) {
		SOCK_LOCK(so);
		so->so_state |= SS_PROTOREF;
		SOCK_UNLOCK(so);
		ssk->flags |= SDP_SOCKREF;
	}
	SDP_WUNLOCK(ssk);
}
static void sdp_close ( struct socket * so ) { struct sdp_sock * ssk ; ssk = sdp_sk ( so ) ; SDP_WLOCK ( ssk ) ; if ( ! ( ssk -> flags & SDP_TIMEWAIT ) && ! ( ssk -> flags & SDP_DROPPED ) ) sdp_start_disconnect ( ssk ) ; if ( ! ( ssk -> flags & SDP_DROPPED ) ) { SOCK_LOCK ( so ) ; so -> so_state |= SS_PROTOREF ; SOCK_UNLOCK ( so ) ; ssk -> flags |= SDP_SOCKREF ; } SDP_WUNLOCK ( ssk ) ; }
Close a SDP socket and initiate a friendly disconnect.
Close a SDP socket and initiate a friendly disconnect .
/*
	 * If we have not yet dropped, do it now.
	 */ /*
	 * If we've still not dropped let the socket layer know we're
	 * holding on to the socket and pcb for a while.
	 */