Use the so_send and so_receive funcptrs in the socket instead of calling

sosend/soreceive directly.  [I've been meaning to commit these for months.]
This commit is contained in:
matt 1998-10-31 01:18:41 +00:00
parent 7d4ee06d3e
commit 32a315ff7c
2 changed files with 9 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fifo_vnops.c,v 1.26 1998/08/03 14:19:59 kleink Exp $ */
/* $NetBSD: fifo_vnops.c,v 1.27 1998/10/31 01:18:41 matt Exp $ */
/*
* Copyright (c) 1990, 1993, 1995
@ -260,8 +260,8 @@ fifo_read(v)
rso->so_state |= SS_NBIO;
startresid = uio->uio_resid;
VOP_UNLOCK(ap->a_vp, 0);
error = soreceive(rso, (struct mbuf **)0, uio, (struct mbuf **)0,
(struct mbuf **)0, (int *)0);
error = (*rso->so_receive)(rso, (struct mbuf **)0, uio,
(struct mbuf **)0, (struct mbuf **)0, (int *)0);
vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY);
/*
* Clear EOF indication after first such return.
@ -301,7 +301,8 @@ fifo_write(v)
if (ap->a_ioflag & IO_NDELAY)
wso->so_state |= SS_NBIO;
VOP_UNLOCK(ap->a_vp, 0);
error = sosend(wso, (struct mbuf *)0, ap->a_uio, 0, (struct mbuf *)0, 0);
error = (*wso->so_send)(wso, (struct mbuf *)0, ap->a_uio, 0,
(struct mbuf *)0, 0);
vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY);
if (ap->a_ioflag & IO_NDELAY)
wso->so_state &= ~SS_NBIO;

View File

@ -1,4 +1,4 @@
/* $NetBSD: portal_vnops.c,v 1.32 1998/08/10 08:11:12 matthias Exp $ */
/* $NetBSD: portal_vnops.c,v 1.33 1998/10/31 01:18:42 matt Exp $ */
/*
* Copyright (c) 1992, 1993
@ -410,7 +410,7 @@ portal_open(v)
auio.uio_offset = 0;
auio.uio_resid = aiov[0].iov_len + aiov[1].iov_len;
error = sosend(so, (struct mbuf *) 0, &auio,
error = (*so->so_send)(so, (struct mbuf *) 0, &auio,
(struct mbuf *) 0, (struct mbuf *) 0, 0);
if (error)
goto bad;
@ -419,8 +419,8 @@ portal_open(v)
do {
struct mbuf *m = 0;
int flags = MSG_WAITALL;
error = soreceive(so, (struct mbuf **) 0, &auio,
&m, &cm, &flags);
error = (*so->so_receive)(so, (struct mbuf **) 0, &auio,
&m, &cm, &flags);
if (error)
goto bad;