2003-09-10 Chris Demetriou <cgd@broadcom.com>
* sysdeps/unix/sysv/linux/mips/pread64.c (__libc_pread64): Fix syscall invocation. * sysdeps/unix/sysv/linux/mips/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/mips/pread.c (__libc_pread): Likewise. Also, only assert off_t size is 4 for N32 and O32, and clean up white space. * sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Likewise.
This commit is contained in:
parent
855bf8c1df
commit
8525f64d52
@ -51,12 +51,15 @@ __libc_pread (fd, buf, count, offset)
|
|||||||
{
|
{
|
||||||
ssize_t result;
|
ssize_t result;
|
||||||
|
|
||||||
|
#if (defined _ABI64 && _MIPS_SIM != _ABI64)
|
||||||
|
assert (sizeof (offset) == 4);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (SINGLE_THREAD_P)
|
if (SINGLE_THREAD_P)
|
||||||
{
|
{
|
||||||
/* First try the syscall. */
|
/* First try the syscall. */
|
||||||
assert (sizeof (offset) == 4);
|
#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
|
||||||
#if defined _ABI64 && _MIPS_SIM == _ABI64
|
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
|
||||||
result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
|
|
||||||
offset);
|
offset);
|
||||||
#else
|
#else
|
||||||
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
|
||||||
@ -73,10 +76,8 @@ __libc_pread (fd, buf, count, offset)
|
|||||||
int oldtype = LIBC_CANCEL_ASYNC ();
|
int oldtype = LIBC_CANCEL_ASYNC ();
|
||||||
|
|
||||||
/* First try the syscall. */
|
/* First try the syscall. */
|
||||||
assert (sizeof (offset) == 4);
|
#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
|
||||||
#if defined _ABI64 && _MIPS_SIM == _ABI64
|
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
|
||||||
result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
|
|
||||||
offset);
|
|
||||||
#else
|
#else
|
||||||
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
|
||||||
__LONG_LONG_PAIR (offset >> 31, offset));
|
__LONG_LONG_PAIR (offset >> 31, offset));
|
||||||
|
@ -54,8 +54,8 @@ __libc_pread64 (fd, buf, count, offset)
|
|||||||
if (SINGLE_THREAD_P)
|
if (SINGLE_THREAD_P)
|
||||||
{
|
{
|
||||||
/* First try the syscall. */
|
/* First try the syscall. */
|
||||||
#if defined _ABI64 && _MIPS_SIM == _ABI64
|
#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
|
||||||
result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
|
||||||
offset);
|
offset);
|
||||||
#else
|
#else
|
||||||
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
|
||||||
@ -73,9 +73,8 @@ __libc_pread64 (fd, buf, count, offset)
|
|||||||
int oldtype = LIBC_CANCEL_ASYNC ();
|
int oldtype = LIBC_CANCEL_ASYNC ();
|
||||||
|
|
||||||
/* First try the syscall. */
|
/* First try the syscall. */
|
||||||
#if defined _ABI64 && _MIPS_SIM == _ABI64
|
#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
|
||||||
result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
|
||||||
offset);
|
|
||||||
#else
|
#else
|
||||||
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
|
||||||
__LONG_LONG_PAIR ((off_t) (offset >> 32),
|
__LONG_LONG_PAIR ((off_t) (offset >> 32),
|
||||||
|
@ -51,12 +51,15 @@ __libc_pwrite (fd, buf, count, offset)
|
|||||||
{
|
{
|
||||||
ssize_t result;
|
ssize_t result;
|
||||||
|
|
||||||
|
#if (defined _ABI64 && _MIPS_SIM != _ABI64)
|
||||||
|
assert (sizeof (offset) == 4);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (SINGLE_THREAD_P)
|
if (SINGLE_THREAD_P)
|
||||||
{
|
{
|
||||||
/* First try the syscall. */
|
/* First try the syscall. */
|
||||||
assert (sizeof (offset) == 4);
|
#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
|
||||||
#if defined _ABI64 && _MIPS_SIM == _ABI64
|
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
|
||||||
result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
|
|
||||||
offset);
|
offset);
|
||||||
#else
|
#else
|
||||||
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
|
||||||
@ -67,17 +70,14 @@ __libc_pwrite (fd, buf, count, offset)
|
|||||||
/* No system call available. Use the emulation. */
|
/* No system call available. Use the emulation. */
|
||||||
result = __emulate_pwrite (fd, buf, count, offset);
|
result = __emulate_pwrite (fd, buf, count, offset);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int oldtype = LIBC_CANCEL_ASYNC ();
|
int oldtype = LIBC_CANCEL_ASYNC ();
|
||||||
|
|
||||||
/* First try the syscall. */
|
/* First try the syscall. */
|
||||||
assert (sizeof (offset) == 4);
|
#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
|
||||||
#if defined _ABI64 && _MIPS_SIM == _ABI64
|
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
|
||||||
result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
|
|
||||||
offset);
|
|
||||||
#else
|
#else
|
||||||
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
|
||||||
__LONG_LONG_PAIR (offset >> 31, offset));
|
__LONG_LONG_PAIR (offset >> 31, offset));
|
||||||
|
@ -53,8 +53,8 @@ __libc_pwrite64 (fd, buf, count, offset)
|
|||||||
if (SINGLE_THREAD_P)
|
if (SINGLE_THREAD_P)
|
||||||
{
|
{
|
||||||
/* First try the syscall. */
|
/* First try the syscall. */
|
||||||
#if defined _ABI64 && _MIPS_SIM == _ABI64
|
#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
|
||||||
result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
|
||||||
offset);
|
offset);
|
||||||
#else
|
#else
|
||||||
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
|
||||||
@ -73,9 +73,8 @@ __libc_pwrite64 (fd, buf, count, offset)
|
|||||||
int oldtype = LIBC_CANCEL_ASYNC ();
|
int oldtype = LIBC_CANCEL_ASYNC ();
|
||||||
|
|
||||||
/* First try the syscall. */
|
/* First try the syscall. */
|
||||||
#if defined _ABI64 && _MIPS_SIM == _ABI64
|
#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
|
||||||
result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
|
||||||
offset);
|
|
||||||
#else
|
#else
|
||||||
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
|
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
|
||||||
__LONG_LONG_PAIR ((off_t) (offset >> 32),
|
__LONG_LONG_PAIR ((off_t) (offset >> 32),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user