These functions are controlled with arrays of @code{iovec} structures,
which describe the location and size of each buffer.
+@comment sys/uio.h
+@comment BSD
@deftp {Data Type} {struct iovec}
The @code{iovec} structure describes a buffer. It contains two fields:
@end table
@end deftp
+@comment sys/uio.h
+@comment BSD
@deftypefun ssize_t readv (int @var{filedes}, const struct iovec *@var{vector}, int @var{count})
The @code{readv} function reads data from @var{filedes} and scatters it
@end deftypefun
+@comment sys/uio.h
+@comment BSD
@deftypefun ssize_t writev (int @var{filedes}, const struct iovec *@var{vector}, int @var{count})
The @code{writev} function gathers data from the buffers described in
@noindent
These functions are declared in @file{sys/mman.h}.
+@comment sys/mman.h
+@comment POSIX
@deftypefun {void *} mmap (void *@var{address}, size_t @var{length},int @var{protect}, int @var{flags}, int @var{filedes}, off_t @var{offset})
The @code{mmap} function creates a new mapping, connected to bytes
@end deftypefun
+@comment sys/mman.h
+@comment LFS
@deftypefun {void *} mmap64 (void *@var{address}, size_t @var{length},int @var{protect}, int @var{flags}, int @var{filedes}, off64_t @var{offset})
The @code{mmap64} function is equivalent to the @code{mmap} function but
the @var{offset} parameter is of type @code{off64_t}. On 32-bit systems
replaces the old API.
@end deftypefun
+@comment sys/mman.h
+@comment POSIX
@deftypefun int munmap (void *@var{addr}, size_t @var{length})
@code{munmap} removes any memory maps from (@var{addr}) to (@var{addr} +
@end deftypefun
+@comment sys/mman.h
+@comment POSIX
@deftypefun int msync (void *@var{address}, size_t @var{length}, int @var{flags})
When using shared mappings, the kernel can write the file at any time
@end deftypefun
+@comment sys/mman.h
+@comment GNU
@deftypefun {void *} mremap (void *@var{address}, size_t @var{length}, size_t @var{new_length}, int @var{flag})
This function can be used to change the size of an existing memory
/* log(0) = -infinity. */
if ((k | u.parts32.w1 | u.parts32.w2 | u.parts32.w3) == 0)
{
- u.parts32.w0 = 0xffff;
+ u.parts32.w0 = 0xffff0000;
return u.value;
}
/* log ( x < 0 ) = NaN */
if (m & 0x80000000)
{
- u.parts32.w0 = 0x7fff;
- u.parts32.w1 = 0xffff;
- u.parts32.w2 = 0xffff;
- u.parts32.w3 = 0xffff;
+ u.parts32.w0 = 0x7fffffff;
+ u.parts32.w1 = 0xffffffff;
+ u.parts32.w2 = 0xffffffff;
+ u.parts32.w3 = 0xffffffff;
return u.value;
}
/* log (infinity or NaN) */