1 /* vi: set sw=4 ts=4: */
3 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
5 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 #include <sys/syscall.h>
13 /* We should generalize this for 32bit userlands w/64bit regs. This applies
14 * to the x86_64 x32 and the mips n32 ABIs. */
15 #if _MIPS_SIM == _MIPS_SIM_NABI32
16 # define __NR___syscall_pread __NR_pread
17 static _syscall4(ssize_t, __syscall_pread, int, fd, void *, buf, size_t, count, off_t, offset)
18 # define MY_PREAD(fd, buf, count, offset) \
19 __syscall_pread(fd, buf, count, offset)
20 # define MY_PREAD64(fd, buf, count, offset) \
21 __syscall_pread(fd, buf, count, offset)
23 # define __NR___syscall_pwrite __NR_pwrite
24 static _syscall4(ssize_t, __syscall_pwrite, int, fd, const void *, buf, size_t, count, off_t, offset)
25 # define MY_PWRITE(fd, buf, count, offset) \
26 __syscall_pwrite(fd, buf, count, offset)
27 # define MY_PWRITE64(fd, buf, count, offset) \
28 __syscall_pwrite(fd, buf, count, offset)
31 #include "../common/pread_write.c"