]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2007-05-06 Ulrich Drepper <drepper@redhat.com>
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 15:19:59 +0000 (15:19 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 15:19:59 +0000 (15:19 +0000)
[BZ #4465]
* posix/unistd.h: Remove __THROW from fdatasync.

2007-05-06  Mike Frysinger  <vapier@gentoo.org>

[BZ #4465]
* sysdeps/unix/sysv/linux/syscalls.list (fdatasync): Add "C" to args.

[BZ #4465]
* tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
* tst-cancel4.c (tf_fdatasync): New test.

ChangeLog
nptl/ChangeLog
nptl/tst-cancel-wrappers.sh
nptl/tst-cancel4.c
posix/unistd.h
sysdeps/unix/sysv/linux/syscalls.list

index b84a2d4d067cf91a82a2d6b9dc7a34cc31718c92..4432d264bab282789c7f7bc7a741074c9a176940 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-05-06  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #4465]
+       * posix/unistd.h: Remove __THROW from fdatasync.
+
+2007-05-06  Mike Frysinger  <vapier@gentoo.org>
+
+       [BZ #4465]
+       * sysdeps/unix/sysv/linux/syscalls.list (fdatasync): Add "C" to args.
+
 2007-05-06  Ulrich Drepper  <drepper@redhat.com>
 
        [BZ #4131]
index 4d706da2c32d66e2fb8c68a9979c3366bd28d065..dc20ef0ec01e0cd7db3e034cca8f061e63b55e35 100644 (file)
@@ -1,3 +1,9 @@
+2007-05-06  Mike Frysinger  <vapier@gentoo.org>
+
+       [BZ #4465]
+       * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
+       * tst-cancel4.c (tf_fdatasync): New test.
+
 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
 
        * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
index d6f16d1ed2d52a7e4d747399f2b2d644bffde60c..53e7879520e3168864f7c458b9b27f473a28132b 100644 (file)
@@ -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..37a04fa3b36a8ddf043eba4b06eeb99a9cdda6c6 100644 (file)
@@ -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 5a88de269c7ad8212bbcab30a8c8c0588cfae3ff..3be7e41426a2a198af74eaf73c875a52a878de81 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 */
 
 
index 8c19a30fcfe5c66b442d4a1a6d9221ca595a0abc..e16110480f6c503b4eb87d4d607cc83f4834f20a 100644 (file)
@@ -10,7 +10,7 @@ delete_module EXTRA   delete_module   3       delete_module
 epoll_create   EXTRA   epoll_create    i:i     epoll_create
 epoll_ctl      EXTRA   epoll_ctl       i:iiip  epoll_ctl
 epoll_wait     EXTRA   epoll_wait      Ci:ipii epoll_wait
-fdatasync      -       fdatasync       i:i     fdatasync
+fdatasync      -       fdatasync       Ci:i    fdatasync
 flock          -       flock           i:ii    __flock         flock
 fork           -       fork            i:      __libc_fork     __fork fork
 get_kernel_syms        EXTRA   get_kernel_syms i:p     get_kernel_syms