]> sourceware.org Git - newlib-cygwin.git/commitdiff
Drop autoloading of CancelSynchronousIo
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 15 Dec 2015 15:39:08 +0000 (16:39 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Fri, 24 Jun 2016 19:07:39 +0000 (21:07 +0200)
winsup/cygwin/autoload.cc
winsup/cygwin/flock.cc

index a4a872e13ec32255525710e86f6c51daacf4491e..0f55c1e962c150f78e63b29c08d85d68237a96cb 100644 (file)
@@ -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)
index ef5f6078b4e74075f069e8b2f576bcec5b13c8ac..860791d7bd185f8be36a73f1e629e1c0fb0306fb 100644 (file)
@@ -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
This page took 0.034308 seconds and 5 git commands to generate.