[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r22843 - in /fsf/trunk/libc: ChangeLog NEWS Rules benchtests/Makefile manual/llio.texi sysdeps/pthread/aio_fsync.c



Author: eglibc
Date: Sat Apr 13 00:02:18 2013
New Revision: 22843

Log:
Import glibc-mainline for 2013-04-13

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/Rules
    fsf/trunk/libc/benchtests/Makefile
    fsf/trunk/libc/manual/llio.texi
    fsf/trunk/libc/sysdeps/pthread/aio_fsync.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Apr 13 00:02:18 2013
@@ -1,3 +1,17 @@
+2013-04-12  Roland McGrath  <roland@xxxxxxxxxxxxx>
+	    Xavier Roche  <roche+kml2@xxxxxxxxxxx>
+
+	[BZ #15361]
+	* sysdeps/pthread/aio_fsync.c (aio_fsync): Don't check open modes,
+	just that it's a file descriptor.
+	* manual/llio.texi (Synchronizing AIO Operations): Update description
+	for EBADF error from aio_fsync.
+
+2013-04-12  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	* Rules (bench): Move target definition...
+	* benchtests/Makefile: ... here.
+
 2013-04-11  Carlos O'Donell  <carlos@xxxxxxxxxx>
 
 	* math/libm-test.inc (cos_test): Fix PI/2 test.

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sat Apr 13 00:02:18 2013
@@ -14,7 +14,7 @@
   14920, 14964, 14981, 14982, 14985, 14994, 14996, 15003, 15006, 15020,
   15023, 15036, 15054, 15055, 15062, 15078, 15160, 15214, 15232, 15234,
   15283, 15285, 15287, 15304, 15305, 15307, 15309, 15327, 15330, 15335,
-  15336, 15337, 15342, 15346.
+  15336, 15337, 15342, 15346, 15361.
 
 * CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
   #15078).

Modified: fsf/trunk/libc/Rules
==============================================================================
--- fsf/trunk/libc/Rules (original)
+++ fsf/trunk/libc/Rules Sat Apr 13 00:02:18 2013
@@ -189,36 +189,6 @@
 
 endif	# tests
 
-# Build and run benchmark programs.
-binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
-
-run-bench = $(test-wrapper-env) \
-	    GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
-	    $($*-ENV) $(rtld-prefix) $${run}
-
-bench: $(binaries-bench)
-	for run in $^; do \
-	  echo "Running $${run}"; \
-	  $(run-bench) >>  $(objpfx)bench.out-tmp; \
-	done; \
-	if [ -f $(objpfx)bench.out ]; then \
-	  mv -f $(objpfx)bench.out $(objpfx)bench.out.old; \
-	fi; \
-	mv -f $(objpfx)bench.out-tmp $(objpfx)bench.out
-
-$(binaries-bench): %: %.o \
-  $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
-  $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
-	$(+link)
-
-$(objpfx)bench-%.c: %-inputs bench-skeleton.c
-	{ if [ -n "$($*-INCLUDE)" ]; then \
-	  cat $($*-INCLUDE); \
-	fi; \
-	$(..)scripts/bench.pl $(patsubst %-inputs,%,$<) \
-	  $($*-ITER) $($*-ARGLIST) $($*-RET); } > $@-tmp
-	mv -f $@-tmp $@
-
 
 .PHONY: distclean realclean subdir_distclean subdir_realclean \
 	subdir_clean subdir_mostlyclean subdir_testclean

Modified: fsf/trunk/libc/benchtests/Makefile
==============================================================================
--- fsf/trunk/libc/benchtests/Makefile (original)
+++ fsf/trunk/libc/benchtests/Makefile Sat Apr 13 00:02:18 2013
@@ -104,5 +104,39 @@
 slowatan-INCLUDE = slowatan.c
 LDFLAGS-bench-slowatan = -lm
 
+
+
+# Rules to build and execute the benchmarks.  Do not put any benchmark
+# parameters beyond this point.
+
 include ../Makeconfig
 include ../Rules
+
+binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
+
+run-bench = $(test-wrapper-env) \
+	    GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
+	    $($*-ENV) $(rtld-prefix) $${run}
+
+bench: $(binaries-bench)
+	for run in $^; do \
+	  echo "Running $${run}"; \
+	  $(run-bench) >>  $(objpfx)bench.out-tmp; \
+	done; \
+	if [ -f $(objpfx)bench.out ]; then \
+	  mv -f $(objpfx)bench.out $(objpfx)bench.out.old; \
+	fi; \
+	mv -f $(objpfx)bench.out-tmp $(objpfx)bench.out
+
+$(binaries-bench): %: %.o \
+  $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
+  $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
+	$(+link)
+
+$(objpfx)bench-%.c: %-inputs bench-skeleton.c
+	{ if [ -n "$($*-INCLUDE)" ]; then \
+	  cat $($*-INCLUDE); \
+	fi; \
+	$(..)scripts/bench.pl $(patsubst %-inputs,%,$<) \
+	  $($*-ITER) $($*-ARGLIST) $($*-RET); } > $@-tmp
+	mv -f $@-tmp $@

Modified: fsf/trunk/libc/manual/llio.texi
==============================================================================
--- fsf/trunk/libc/manual/llio.texi (original)
+++ fsf/trunk/libc/manual/llio.texi Sat Apr 13 00:02:18 2013
@@ -2320,8 +2320,7 @@
 @item EAGAIN
 The request could not be enqueued due to temporary lack of resources.
 @item EBADF
-The file descriptor @code{aiocbp->aio_fildes} is not valid or not open
-for writing.
+The file descriptor @code{@var{aiocbp}->aio_fildes} is not valid.
 @item EINVAL
 The implementation does not support I/O synchronization or the @var{op}
 parameter is other than @code{O_DSYNC} and @code{O_SYNC}.

Modified: fsf/trunk/libc/sysdeps/pthread/aio_fsync.c
==============================================================================
--- fsf/trunk/libc/sysdeps/pthread/aio_fsync.c (original)
+++ fsf/trunk/libc/sysdeps/pthread/aio_fsync.c Sat Apr 13 00:02:18 2013
@@ -36,17 +36,14 @@
 int
 aio_fsync (int op, struct aiocb *aiocbp)
 {
-  int flags;
-
   if (op != O_DSYNC && __builtin_expect (op != O_SYNC, 0))
     {
       __set_errno (EINVAL);
       return -1;
     }
 
-  flags = fcntl (aiocbp->aio_fildes, F_GETFL);
-  if (__builtin_expect (flags == -1, 0)
-      || __builtin_expect ((flags & O_ACCMODE) == O_RDONLY, 0))
+  /* Verify that this is an open file descriptor.  */
+  if (__glibc_unlikely (fcntl (aiocbp->aio_fildes, F_GETFL) == -1))
     {
       __set_errno (EBADF);
       return -1;

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits