This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin 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]

[newlib-cygwin] Drop autoloading of CancelSynchronousIo


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=450b2dc8ed55587db11200a014120fe79bef04e4

commit 450b2dc8ed55587db11200a014120fe79bef04e4
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Tue Dec 15 16:39:08 2015 +0100

    Drop autoloading of CancelSynchronousIo

Diff:
---
 winsup/cygwin/autoload.cc |  1 -
 winsup/cygwin/flock.cc    | 14 ++++++--------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index a4a872e..0f55c1e 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -577,7 +577,6 @@ LoadDLLfunc (GetUdpTable, 12, iphlpapi)
 LoadDLLfunc (if_indextoname, 8, iphlpapi)
 LoadDLLfunc (if_nametoindex, 4, iphlpapi)
 
-LoadDLLfuncEx (CancelSynchronousIo, 4, kernel32, 1)
 LoadDLLfunc (CreateSymbolicLinkW, 12, kernel32)
 LoadDLLfuncEx2 (DiscardVirtualMemory, 8, kernel32, 1, 127)
 LoadDLLfuncEx (GetLogicalProcessorInformationEx, 12, kernel32, 1)
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index ef5f607..860791d 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -2006,14 +2006,12 @@ fhandler_disk_file::mand_lock (int a_op, struct flock *fl)
 	      thr->detach ();
 	      break;
 	    default:
-	      /* Signal arrived. */
-	      /* Starting with Vista, CancelSynchronousIo works, and we wait
-		 for the thread to exit.  lp.status will be either
-		 STATUS_SUCCESS, or STATUS_CANCELLED.  We only call
-		 NtUnlockFile in the first case.
-		 Prior to Vista, CancelSynchronousIo doesn't exist, so we
-		 terminated the thread and always call NtUnlockFile since
-		 lp.status was 0 to begin with. */
+	      /* Signal arrived.
+		 If CancelSynchronousIo works we wait for the thread to exit.
+		 lp.status will be either STATUS_SUCCESS, or STATUS_CANCELLED.
+		 We only call NtUnlockFile in the first case.
+		 If CancelSynchronousIo fails we terminated the thread and
+		 call NtUnlockFile since lp.status was 0 to begin with. */
 	      if (CancelSynchronousIo (thr->thread_handle ()))
 		thr->detach ();
 	      else


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