]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* posix/unistd.h: Remove __THROW from fdatasync.
authorUlrich Drepper <drepper@redhat.com>
Mon, 7 May 2007 04:23:14 +0000 (04:23 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 7 May 2007 04:23:14 +0000 (04:23 +0000)
ChangeLog
nptl/ChangeLog
nptl/tst-cancel-wrappers.sh
nptl/tst-cancel4.c
posix/unistd.h

index 08ab0ee097fb5d1ec68fcb3ac278d29d24e50a96..75cdcb04f09bf6073eab5ef019ba9ca73f57e1bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-05-06  Ulrich Drepper  <drepper@redhat.com>
+
+       * posix/unistd.h: Remove __THROW from fdatasync.
+
 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
 
        * sysdeps/unix/sysv/linux/syscalls.list (fdatasync): Add "C" to args.
index ce3ca4101c2fe34a3a51b32a7dfe446c63cd8233..fe25da2b96c0d1f978b59f02d350a4810931a566 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-06  Mike Frysinger  <vapier@gentoo.org>
+
+       * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
+       * tst-cancel4.c (tf_fdatasync): New test.
+
 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
 
        [BZ #4392]
index d6f16d1ed2d52a7e4d747399f2b2d644bffde60c..61b9fb52de171f5f4b796daca11f80c3e2ea772f 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test whether all cancelable functions are cancelable.
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 # Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
 
@@ -26,6 +26,7 @@ C["close"]=1
 C["connect"]=1
 C["creat"]=1
 C["fcntl"]=1
+C["fdatasync"]=1
 C["fsync"]=1
 C["msgrcv"]=1
 C["msgsnd"]=1
index 73cfa44614f9d942976d5ad9ce52b53df17dc081..45df6ce07686b4d3431a3e8321790d732230feba 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -1570,6 +1570,47 @@ tf_fsync (void *arg)
 }
 
 
+static void *
+tf_fdatasync (void *arg)
+{
+  if (arg == NULL)
+    // XXX If somebody can provide a portable test case in which fdatasync()
+    // blocks we can enable this test to run in both rounds.
+    abort ();
+
+  tempfd = open ("Makefile", O_RDONLY);
+  if (tempfd == -1)
+    {
+      printf ("%s: cannot open Makefile\n", __FUNCTION__);
+      exit (1);
+    }
+
+  int r = pthread_barrier_wait (&b2);
+  if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
+    {
+      printf ("%s: barrier_wait failed\n", __FUNCTION__);
+      exit (1);
+    }
+
+  r = pthread_barrier_wait (&b2);
+  if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
+    {
+      printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__);
+      exit (1);
+    }
+
+  pthread_cleanup_push (cl, NULL);
+
+  fdatasync (tempfd);
+
+  pthread_cleanup_pop (0);
+
+  printf ("%s: fdatasync returned\n", __FUNCTION__);
+
+  exit (1);
+}
+
+
 static void *
 tf_msync (void *arg)
 {
@@ -2078,6 +2119,7 @@ static struct
   ADD_TEST (pread, 2, 1),
   ADD_TEST (pwrite, 2, 1),
   ADD_TEST (fsync, 2, 1),
+  ADD_TEST (fdatasync, 2, 1),
   ADD_TEST (msync, 2, 1),
   ADD_TEST (sendto, 2, 1),
   ADD_TEST (sendmsg, 2, 1),
index 577925c0fa241d24326403dc3b64ed652f6e1866..a86968a8db606e1c1fe41a0059930bd99e10c88b 100644 (file)
@@ -1062,7 +1062,7 @@ extern int lockf64 (int __fd, int __cmd, __off64_t __len) __wur;
 #if defined __USE_POSIX199309 || defined __USE_UNIX98
 /* Synchronize at least the data part of a file with the underlying
    media.  */
-extern int fdatasync (int __fildes) __THROW;
+extern int fdatasync (int __fildes);
 #endif /* Use POSIX199309 */