about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-05 23:30:38 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-05 23:30:38 +0000
commit5cd09cd6482726257275ce45e39c5dd7dcbe9251 (patch)
treeb15b315544dbf3884ed08e1f0cacc787a3185ca4 /sysdeps
parente0f86659bebf16c150e1c4cfe385c643c424e322 (diff)
downloadglibc-5cd09cd6482726257275ce45e39c5dd7dcbe9251.tar.gz
glibc-5cd09cd6482726257275ce45e39c5dd7dcbe9251.tar.xz
glibc-5cd09cd6482726257275ce45e39c5dd7dcbe9251.zip
Update.
	* sysdeps/unix/sysv/linux/posix_fadvise.c: New file.
	* sysdeps/unix/sysv/linux/syscalls.list: Add posix_fadvise64 syscall.
	* sysdeps/unix/sysv/linux/alpha/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/ia64/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/posix_fadvise.c36
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list1
7 files changed, 42 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 6907ef1d2f..96bc8a5fd3 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -20,6 +20,7 @@ getpeername	-	getpeername	3	__getpeername	getpeername
 getpriority	-	getpriority	2	__getpriority	getpriority
 mmap		-	mmap		6	__mmap		mmap __mmap64 mmap64
 llseek		EXTRA	lseek		C:3	__libc_lseek64	__llseek llseek __lseek64 lseek64
+posix_fadvise64	-	fadvise64	4	posix_fadvise64	posix_fadvise
 pread		-	pread		C:4	__libc_pread	__libc_pread64 __pread pread __pread64 pread64
 pwrite		-	pwrite		C:4	__libc_pwrite	__libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
 fstatfs		-	fstatfs		2	__fstatfs	fstatfs __fstatfs64 fstatfs64
diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list
index 7df0265feb..0985cc97a2 100644
--- a/sysdeps/unix/sysv/linux/ia64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list
@@ -5,6 +5,7 @@ umount2		-	umount		2	__umount2	umount2
 # Whee! 64-bit systems naturally implement llseek.
 llseek		EXTRA	lseek		C:3	__libc_lseek	__lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
 lseek		llseek	-
+posix_fadvise64	-	fadvise64	4	posix_fadvise64	posix_fadvise
 pread		-	pread		C:4	__libc_pread	__libc_pread64 __pread pread __pread64 pread64
 pwrite		-	pwrite		C:4	__libc_pwrite	__libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
 fstatfs		-	fstatfs		i:ip	__fstatfs	fstatfs fstatfs64 __fstatfs64
diff --git a/sysdeps/unix/sysv/linux/posix_fadvise.c b/sysdeps/unix/sysv/linux/posix_fadvise.c
new file mode 100644
index 0000000000..fb1e59b2d3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/posix_fadvise.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+/* Advice the system about the expected behaviour of the application with
+   respect to the file associated with FD.  */
+
+int
+posix_fadvise (int fd, __off_t offset, size_t len, int advise)
+{
+#ifdef __NR_fadvise64
+  return INLINE_SYSCALL (fadvise64, 5, fd,
+			 __LONG_LONG_PAIR (offset >> 31, offset), len, advise);
+#else
+  __set_errno (ENOSYS);
+  return -1;
+#endif
+}
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list b/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list
index 5266c4f59f..9dbe0ed29e 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list
@@ -25,6 +25,7 @@ s_getrlimit	getrlimit getrlimit	i:ip	__syscall_getrlimit
 s_lstat64	lxstat64 lstat64	i:sp	__syscall_lstat64
 s_mmap2		mmap64	mmap2		b:aniiii __syscall_mmap2
 s_poll		poll	poll		i:pii	__syscall_poll
+posix_fadvise64	-	fadvise64	4	posix_fadvise64	posix_fadvise
 s_ptrace	ptrace	ptrace		i:iipp	__syscall_ptrace
 s_putpmsg	putpmsg	putpmsg		i:ippii	__syscall_putpmsg
 s_reboot	reboot	reboot		i:iii	__syscall_reboot
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
index 273ed4fb5d..53284318d4 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
@@ -10,6 +10,7 @@ getpeername	-	getpeername	i:ipp	__getpeername	getpeername
 ftruncate	-	ftruncate	2	__ftruncate	ftruncate ftruncate64 __ftruncate64
 truncate	-	truncate	2	truncate	truncate64
 getrlimit	-	getrlimit	2	__getrlimit	getrlimit getrlimit64
+posix_fadvise64	-	fadvise64	4	posix_fadvise64	posix_fadvise
 setrlimit	-	setrlimit	2	__setrlimit	setrlimit setrlimit64
 vfork		-	vfork		0	__vfork		vfork
 
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
index a34e49246e..ac0610feda 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
@@ -13,6 +13,7 @@ truncate	-	truncate	2	truncate	truncate64
 mmap		-	mmap		6	__mmap		mmap __mmap64 mmap64
 readahead	-	readahead	3	__readahead	readahead
 sendfile	-	sendfile	i:iipi	sendfile	sendfile64
+posix_fadvise64	-	fadvise64	4	posix_fadvise64	posix_fadvise
 
 # Override select.S in parent directory:
 select		-	select		C:5	__select	select
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 15c6b880fe..e629a6ca1d 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -43,6 +43,7 @@ pause		-	pause		Ci:	__libc_pause	pause
 personality	init-first personality	i:i	__personality	personality
 pipe		-	pipe		i:f	__pipe		pipe
 pivot_root	EXTRA	pivot_root	i:ss	pivot_root
+posix_fadvise64	-	fadvise64	i:iiiii	posix_advise64
 prctl		EXTRA	prctl		i:iiiii	__prctl		prctl
 putpmsg		-	putpmsg		i:ippii	putpmsg
 query_module	EXTRA	query_module	i:sipip	query_module