Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-12-15 18:39:08 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-06-24 22:07:39 +0300
commit450b2dc8ed55587db11200a014120fe79bef04e4 (patch)
treec2f5491521a0fa7eaf49fc1fd727660dc40f8e44 /winsup/cygwin/flock.cc
parent67fd2101ab764dff2a9ce919a59d09108ae09281 (diff)
Drop autoloading of CancelSynchronousIo
Diffstat (limited to 'winsup/cygwin/flock.cc')
-rw-r--r--winsup/cygwin/flock.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index ef5f6078b..860791d7b 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