aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/uipc_syscalls.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2006-07-24 15:20:08 +0000
committerRobert Watson <rwatson@FreeBSD.org>2006-07-24 15:20:08 +0000
commitb0668f715175467a677a4b11f75ae1ca652e118a (patch)
treeb3a0ac6c1795bad8df68bc26486cfcd7d7e796ec /sys/kern/uipc_syscalls.c
parent8eb98847eab74f81c7a4d0348745bb4f13ec5f92 (diff)
downloadsrc-b0668f715175467a677a4b11f75ae1ca652e118a.tar.gz
src-b0668f715175467a677a4b11f75ae1ca652e118a.zip
soreceive_generic(), and sopoll_generic(). Add new functions sosend(),
soreceive(), and sopoll(), which are wrappers for pru_sosend, pru_soreceive, and pru_sopoll, and are now used univerally by socket consumers rather than either directly invoking the old so*() functions or directly invoking the protocol switch method (about an even split prior to this commit). This completes an architectural change that was begun in 1996 to permit protocols to provide substitute implementations, as now used by UDP. Consumers now uniformly invoke sosend(), soreceive(), and sopoll() to perform these operations on sockets -- in particular, distributed file systems and socket system calls. Architectural head nod: sam, gnn, wollman
Notes
Notes: svn path=/head/; revision=160619
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r--sys/kern/uipc_syscalls.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index a9eaa0d82328..431fbb9ed26d 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -803,8 +803,7 @@ kern_sendit(td, s, mp, flags, control, segflg)
ktruio = cloneuio(&auio);
#endif
len = auio.uio_resid;
- error = so->so_proto->pr_usrreqs->pru_sosend(so, mp->msg_name, &auio,
- 0, control, flags, td);
+ error = sosend(so, mp->msg_name, &auio, 0, control, flags, td);
if (error) {
if (auio.uio_resid != len && (error == ERESTART ||
error == EINTR || error == EWOULDBLOCK))
@@ -1020,8 +1019,7 @@ kern_recvit(td, s, mp, fromseg, controlp)
ktruio = cloneuio(&auio);
#endif
len = auio.uio_resid;
- error = so->so_proto->pr_usrreqs->pru_soreceive(so, &fromsa, &auio,
- (struct mbuf **)0,
+ error = soreceive(so, &fromsa, &auio, (struct mbuf **)0,
(mp->msg_control || controlp) ? &control : (struct mbuf **)0,
&mp->msg_flags);
if (error) {