summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_sysent.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1998-11-05 14:28:26 +0000
committerdg <dg@FreeBSD.org>1998-11-05 14:28:26 +0000
commitb178f74f12a0446656640ae873e0bc71057f5de3 (patch)
treed66b2ab9c599863a9679de94cdc9514d6a3dbd1d /sys/kern/init_sysent.c
parent60b560b337fe2a6159e49741372219aa0353da03 (diff)
downloadFreeBSD-src-b178f74f12a0446656640ae873e0bc71057f5de3.zip
FreeBSD-src-b178f74f12a0446656640ae873e0bc71057f5de3.tar.gz
Implemented zero-copy TCP/IP extensions via sendfile(2) - send a
file to a stream socket. sendfile(2) is similar to implementations in HP-UX, Linux, and other systems, but the API is more extensive and addresses many of the complaints that the Apache Group and others have had with those other implementations. Thanks to Marc Slemko of the Apache Group for helping me work out the best API for this. Anyway, this has the "net" result of speeding up sends of files over TCP/IP sockets by about 10X (that is to say, uses 1/10th of the CPU cycles) when compared to a traditional read/write loop.
Diffstat (limited to 'sys/kern/init_sysent.c')
-rw-r--r--sys/kern/init_sysent.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c
index d806c5b..a8307b1 100644
--- a/sys/kern/init_sysent.c
+++ b/sys/kern/init_sysent.c
@@ -355,4 +355,5 @@ struct sysent sysent[] = {
{ 1, (sy_call_t *)sched_get_priority_min }, /* 333 = sched_get_priority_min */
{ 2, (sy_call_t *)sched_rr_get_interval }, /* 334 = sched_rr_get_interval */
{ 2, (sy_call_t *)utrace }, /* 335 = utrace */
+ { 8, (sy_call_t *)sendfile }, /* 336 = sendfile */
};
OpenPOWER on IntegriCloud