This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Community source repository for glibc add-on ports branch, master, updated. glibc-2.13-16-g0f53d14


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Community source repository for glibc add-on ports".

The branch, master has been updated
       via  0f53d140ec86a1a97722d922e2db5d38b4397388 (commit)
      from  6d9a4e5564565cecbf6aae27570cf44ebe9a0fcd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=0f53d140ec86a1a97722d922e2db5d38b4397388

commit 0f53d140ec86a1a97722d922e2db5d38b4397388
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Apr 1 16:11:19 2011 +0000

    Make MIPS fallocate, fallocate64 and sync_file_range cancellation points.

diff --git a/ChangeLog.mips b/ChangeLog.mips
index c811fd7..04cab0c 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,16 @@
 2011-04-01  Joseph Myers  <joseph@codesourcery.com>
 
+	* sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c: Make
+	cancelable.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c: Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c: Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Mark
+	sync_file_range as cancellation point.
+	* sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Mark
+	sync_file_range as cancellation point.
+
+2011-04-01  Joseph Myers  <joseph@codesourcery.com>
+
 	* sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Add
 	sync_file_range.
 
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
index 13a21b0..21da50e 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
@@ -1,5 +1,5 @@
 /* Selective file content synch'ing.
-   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2011 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
@@ -21,7 +21,7 @@
 #include <fcntl.h>
 #include <sys/types.h>
 
-#include <sysdep.h>
+#include <sysdep-cancel.h>
 #include <sys/syscall.h>
 
 
@@ -29,10 +29,23 @@
 int
 sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
 {
-  return INLINE_SYSCALL (sync_file_range, 7, fd, 0,
-			 __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
-			 __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
-			 flags);
+  if (SINGLE_THREAD_P)
+    return INLINE_SYSCALL (sync_file_range, 7, fd, 0,
+			   __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+			   __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
+			   flags);
+
+  int result;
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  result = INLINE_SYSCALL (sync_file_range, 7, fd, 0,
+			   __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+			   __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
+			   flags);
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
 }
 #else
 int
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
index f973250..0aecba1 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 2009, 2011 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
@@ -18,7 +18,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <sysdep.h>
+#include <sysdep-cancel.h>
 
 
 /* Reserve storage for the data of the file associated with FD.  */
@@ -26,7 +26,17 @@ int
 fallocate (int fd, int mode, __off_t offset, __off_t len)
 {
 #ifdef __NR_fallocate
-  return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+  if (SINGLE_THREAD_P)
+    return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+
+  int result;
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  result = INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
 #else
   __set_errno (ENOSYS);
   return -1;
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
index 1f37f91..670cb0e 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 2009, 2011 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
@@ -18,7 +18,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <sysdep.h>
+#include <sysdep-cancel.h>
 
 
 /* Reserve storage for the data of the file associated with FD.  */
@@ -26,7 +26,17 @@ int
 fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)
 {
 #ifdef __NR_fallocate
-  return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+  if (SINGLE_THREAD_P)
+    return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+
+  int result;
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  result = INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
 #else
   __set_errno (ENOSYS);
   return -1;
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
index 87c1949..0d37a9b 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
@@ -1,7 +1,7 @@
 # File name	Caller	Syscall name	# args	Strong name	Weak names
 
 readahead	-	readahead	i:iii	__readahead	readahead
-sync_file_range	-	sync_file_range	i:iiii	sync_file_range
+sync_file_range	-	sync_file_range	Ci:iiii	sync_file_range
 ftruncate	-	ftruncate	i:ii	__ftruncate	ftruncate ftruncate64 __ftruncate64
 truncate	-	truncate	i:si	truncate	truncate64
 
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
index 2404709..8d70e45 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
@@ -1,6 +1,6 @@
 # File name	Caller	Syscall name	# args	Strong name	Weak names
 
-sync_file_range	-	sync_file_range	i:iiii	sync_file_range
+sync_file_range	-	sync_file_range	Ci:iiii	sync_file_range
 
 prlimit		EXTRA	prlimit64	i:iipp	prlimit		prlimit64
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog.mips                                     |   11 ++++++++
 .../unix/sysv/linux/mips/mips32/sync_file_range.c  |   25 +++++++++++++++----
 .../unix/sysv/linux/mips/mips64/n32/fallocate.c    |   16 ++++++++++--
 .../unix/sysv/linux/mips/mips64/n32/fallocate64.c  |   16 ++++++++++--
 .../unix/sysv/linux/mips/mips64/n32/syscalls.list  |    2 +-
 .../unix/sysv/linux/mips/mips64/n64/syscalls.list  |    2 +-
 6 files changed, 58 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
Community source repository for glibc add-on ports


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]