mirror of https://github.com/mkerrisk/man-pages
posix_fadvise.2, pread.2, readahead.2, sync_file_range.2, truncate.2: Refer to syscall(2) for ABI semantics on certain 32-bit architectures
Also: in sync_file_range.2 and posix_fadvise.2 remove description of conventional calling signature as flawed, and in posix_fadvise.2, de-emphasize focus on ARM, and rather phrase as a more general discussion of certain architectures. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
bed6b26e9f
commit
63ec43ae07
|
@ -25,7 +25,7 @@
|
|||
.\" 2005-04-08 mtk, noted kernel version and added BUGS
|
||||
.\" 2010-10-09, mtk, document arm_fadvise64_64()
|
||||
.\"
|
||||
.TH POSIX_FADVISE 2 2010-10-09 "Linux" "Linux Programmer's Manual"
|
||||
.TH POSIX_FADVISE 2 2013-04-01 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
posix_fadvise \- predeclare an access pattern for file data
|
||||
.SH SYNOPSIS
|
||||
|
@ -151,18 +151,25 @@ call
|
|||
or
|
||||
.BR fdatasync (2)
|
||||
first.
|
||||
.SS arm_fadvise()
|
||||
The ARM architecture
|
||||
needs 64-bit arguments to be aligned in a suitable pair of registers.
|
||||
On this architecture, the call signature of
|
||||
.SS Architecture-specific variants
|
||||
Some architectures require
|
||||
64-bit arguments to be aligned in a suitable pair of registers (see
|
||||
.BR syscall (2)
|
||||
for further detail).
|
||||
On such architectures, the call signature of
|
||||
.BR posix_fadvise ()
|
||||
is flawed, since it forces a register to be wasted as padding between the
|
||||
shown in the SYNOPSIS would force
|
||||
a register to be wasted as padding between the
|
||||
.I fd
|
||||
and
|
||||
.I len
|
||||
arguments.
|
||||
Therefore, since Linux 2.6.14, ARM defines a different
|
||||
system call that orders the arguments suitably:
|
||||
Therefore, these architectures define a version of the
|
||||
system call that orders the arguments suitably,
|
||||
but otherwise is otherwise exactly the same as
|
||||
.BR posix_fadvise ().
|
||||
|
||||
For example, since Linux 2.6.14, ARM has the following system call:
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
|
@ -171,10 +178,11 @@ system call that orders the arguments suitably:
|
|||
.fi
|
||||
.in
|
||||
.PP
|
||||
The behavior of this system call is otherwise exactly the same as
|
||||
.BR posix_fadvise ().
|
||||
No library support is provided for this system call in glibc.
|
||||
.\" No ARM support in glibc.
|
||||
These architecture-specific details are generally
|
||||
hidden from applications by the glibc
|
||||
.BR posix_fadvise ()
|
||||
wrapper function,
|
||||
which invokes the appropriate architecture-specific system call.
|
||||
.SH BUGS
|
||||
In kernels before 2.6.6, if
|
||||
.I len
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
.\" the source, must acknowledge the copyright and authors of this work.
|
||||
.\" %%%LICENSE_END
|
||||
.\"
|
||||
.TH PREAD 2 2012-04-30 "Linux" "Linux Programmer's Manual"
|
||||
.TH PREAD 2 2013-04-01 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
pread, pwrite \- read from or write to a file descriptor at a given offset
|
||||
.SH SYNOPSIS
|
||||
|
@ -130,6 +130,11 @@ The glibc
|
|||
and
|
||||
.BR pwrite ()
|
||||
wrapper functions transparently deal with the change.
|
||||
|
||||
On some 32-bit architectures,
|
||||
the calling signature for these system calls differ,
|
||||
for the reasons described in
|
||||
.BR syscall (2).
|
||||
.SH BUGS
|
||||
POSIX requires that opening a file with the
|
||||
.BR O_APPEND
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
.\" 2004-05-40 Created by Michael Kerrisk <mtk.manpages@gmail.com>
|
||||
.\" 2004-10-05 aeb, minor correction
|
||||
.\"
|
||||
.TH READAHEAD 2 2010-09-10 "Linux" "Linux Programmer's Manual"
|
||||
.TH READAHEAD 2 2013-04-01 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
readahead \- perform file readahead into page cache
|
||||
.SH SYNOPSIS
|
||||
|
@ -89,6 +89,11 @@ The
|
|||
.BR readahead ()
|
||||
system call is Linux-specific, and its use should be avoided
|
||||
in portable applications.
|
||||
.SH NOTES
|
||||
On some 32-bit architectures,
|
||||
the calling signature for this system call differs,
|
||||
for the reasons described in
|
||||
.BR syscall (2).
|
||||
.SH SEE ALSO
|
||||
.BR lseek (2),
|
||||
.BR madvise (2),
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
.\" Andrew Morton's comments in fs/sync.c
|
||||
.\" 2010-10-09, mtk, Document sync_file_range2()
|
||||
.\"
|
||||
.TH SYNC_FILE_RANGE 2 2010-10-09 "Linux" "Linux Programmer's Manual"
|
||||
.TH SYNC_FILE_RANGE 2 2013-04-01 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
sync_file_range \- sync a file segment with disk
|
||||
.SH SYNOPSIS
|
||||
|
@ -186,11 +186,15 @@ need 64-bit arguments to be aligned in a suitable pair of registers.
|
|||
.\" See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
|
||||
On such architectures, the call signature of
|
||||
.BR sync_file_range ()
|
||||
is flawed, since it forces a register to be wasted as padding between the
|
||||
shown in the SYNOPSIS would force
|
||||
a register to be wasted as padding between the
|
||||
.I fd
|
||||
and
|
||||
.I offset
|
||||
arguments.
|
||||
(See
|
||||
.BR syscall (2)
|
||||
for details.)
|
||||
Therefore, these architectures define a different
|
||||
system call that orders the arguments suitably:
|
||||
.PP
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
.\" Modified 2002-04-06 by Andries Brouwer <aeb@cwi.nl>
|
||||
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
|
||||
.\"
|
||||
.TH TRUNCATE 2 2011-09-08 "Linux" "Linux Programmer's Manual"
|
||||
.TH TRUNCATE 2 2013-04-01 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
truncate, ftruncate \- truncate a file to a specified length
|
||||
.SH SYNOPSIS
|
||||
|
@ -240,6 +240,11 @@ system calls that handle large files.
|
|||
However, these details can be ignored by applications using glibc, whose
|
||||
wrapper functions transparently employ the more recent system calls
|
||||
where they are available.
|
||||
|
||||
On some 32-bit architectures,
|
||||
the calling signature for these system calls differ,
|
||||
for the reasons described in
|
||||
.BR syscall (2).
|
||||
.SH BUGS
|
||||
A header file bug in glibc 2.12 meant that the minimum value of
|
||||
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=12037
|
||||
|
|
Loading…
Reference in New Issue