~ubuntu-branches/ubuntu/precise/eglibc/precise-201308281639

« back to all changes in this revision

Viewing changes to ports/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-02-08 01:58:09 UTC
  • mfrom: (1.5.3) (288.1.12 precise)
  • Revision ID: package-import@ubuntu.com-20120208015809-ulscst7uteq3e22z
Tags: 2.15~pre6-0ubuntu10
Merge from Debian (r5151, 2.13-26).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Selective file content synch'ing.
2
 
   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
2
   Copyright (C) 2006, 2007, 2011 Free Software Foundation, Inc.
3
3
   This file is part of the GNU C Library.
4
4
 
5
5
   The GNU C Library is free software; you can redistribute it and/or
21
21
#include <fcntl.h>
22
22
#include <sys/types.h>
23
23
 
24
 
#include <sysdep.h>
 
24
#include <sysdep-cancel.h>
25
25
#include <sys/syscall.h>
26
26
 
27
27
 
29
29
int
30
30
sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
31
31
{
32
 
  return INLINE_SYSCALL (sync_file_range, 7, fd, 0,
33
 
                         __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
34
 
                         __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
35
 
                         flags);
 
32
  if (SINGLE_THREAD_P)
 
33
    return INLINE_SYSCALL (sync_file_range, 7, fd, 0,
 
34
                           __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
 
35
                           __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
 
36
                           flags);
 
37
 
 
38
  int result;
 
39
  int oldtype = LIBC_CANCEL_ASYNC ();
 
40
 
 
41
  result = INLINE_SYSCALL (sync_file_range, 7, fd, 0,
 
42
                           __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
 
43
                           __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
 
44
                           flags);
 
45
 
 
46
  LIBC_CANCEL_RESET (oldtype);
 
47
 
 
48
  return result;
36
49
}
37
50
#else
38
51
int