diff options
| author | Chris Costello <chris@FreeBSD.org> | 2000-05-19 02:53:55 +0000 |
|---|---|---|
| committer | Chris Costello <chris@FreeBSD.org> | 2000-05-19 02:53:55 +0000 |
| commit | ef626a01c1880462664a28e1bc76dfbb5ca13eac (patch) | |
| tree | 279f6c667d8f0fd7d880b064ea489fd39b5660d4 /lib/libc | |
| parent | 76e61b9c71eb33a7eca391447fa6db9cd81a214c (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/sys/sendfile.2 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2 index 878a3ad521df..1718872ec234 100644 --- a/lib/libc/sys/sendfile.2 +++ b/lib/libc/sys/sendfile.2 @@ -103,6 +103,33 @@ is returned. The FreeBSD implementation of .Fn sendfile is "zero-copy", meaning that it has been optimized so that copying of the file data is avoided. +.Pp +In the non-threaded library +.Fn sendfile +is implemented as the +.Va sendfile +syscall. +.Pp +In the threaded library, the +.Va sendfile +syscall is assembled to +.Fn _thread_sys_sendfile +and +.Fn sendfile +is implemented as a function which locks +.Fa fd +for reading and +.Fa s +for writing, then calls +.Fn _thread_sys_sendfile . +If the call to +.Fn _thread_sys_sendfile +would block, a context switch is performed. Before returning, +.Fn sendfile +unlocks +.Fa fd +and +.Fa s . .Sh RETURN VALUES Upon successful completion, .Fn sendfile |
