diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 15:19:59 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 15:19:59 +0000 |
commit | 0f2401c5eaf467c499f3b7ed58773b6ca5316acc (patch) | |
tree | 57f671d66b43c6034e2ba1b654e52eafd10770f2 | |
parent | b4696b570a51c684e323de6ce8770ff99008adc5 (diff) | |
download | glibc-0f2401c5eaf467c499f3b7ed58773b6ca5316acc.tar glibc-0f2401c5eaf467c499f3b7ed58773b6ca5316acc.tar.gz glibc-0f2401c5eaf467c499f3b7ed58773b6ca5316acc.tar.bz2 glibc-0f2401c5eaf467c499f3b7ed58773b6ca5316acc.zip |
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.
[BZ #4465]
* tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
* tst-cancel4.c (tf_fdatasync): New test.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | nptl/ChangeLog | 6 | ||||
-rw-r--r-- | nptl/tst-cancel-wrappers.sh | 1 | ||||
-rw-r--r-- | nptl/tst-cancel4.c | 42 | ||||
-rw-r--r-- | posix/unistd.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/syscalls.list | 2 |
6 files changed, 61 insertions, 2 deletions
@@ -1,5 +1,15 @@ 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] * elf/dl-addr.c (_dl_addr): Compare address with actual segment boundaries to work around systems with overlapping binary loading. diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 4d706da2c3..dc20ef0ec0 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -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 diff --git a/nptl/tst-cancel-wrappers.sh b/nptl/tst-cancel-wrappers.sh index d6f16d1ed2..53e7879520 100644 --- a/nptl/tst-cancel-wrappers.sh +++ b/nptl/tst-cancel-wrappers.sh @@ -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 diff --git a/nptl/tst-cancel4.c b/nptl/tst-cancel4.c index 73cfa44614..37a04fa3b3 100644 --- a/nptl/tst-cancel4.c +++ b/nptl/tst-cancel4.c @@ -1571,6 +1571,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) { if (arg == NULL) @@ -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), diff --git a/posix/unistd.h b/posix/unistd.h index 5a88de269c..3be7e41426 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -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 */ diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 8c19a30fcf..e16110480f 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -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 |