Drop autoloading of CancelSynchronousIo
This commit is contained in:
parent
67fd2101ab
commit
450b2dc8ed
|
@ -577,7 +577,6 @@ LoadDLLfunc (GetUdpTable, 12, iphlpapi)
|
||||||
LoadDLLfunc (if_indextoname, 8, iphlpapi)
|
LoadDLLfunc (if_indextoname, 8, iphlpapi)
|
||||||
LoadDLLfunc (if_nametoindex, 4, iphlpapi)
|
LoadDLLfunc (if_nametoindex, 4, iphlpapi)
|
||||||
|
|
||||||
LoadDLLfuncEx (CancelSynchronousIo, 4, kernel32, 1)
|
|
||||||
LoadDLLfunc (CreateSymbolicLinkW, 12, kernel32)
|
LoadDLLfunc (CreateSymbolicLinkW, 12, kernel32)
|
||||||
LoadDLLfuncEx2 (DiscardVirtualMemory, 8, kernel32, 1, 127)
|
LoadDLLfuncEx2 (DiscardVirtualMemory, 8, kernel32, 1, 127)
|
||||||
LoadDLLfuncEx (GetLogicalProcessorInformationEx, 12, kernel32, 1)
|
LoadDLLfuncEx (GetLogicalProcessorInformationEx, 12, kernel32, 1)
|
||||||
|
|
|
@ -2006,14 +2006,12 @@ fhandler_disk_file::mand_lock (int a_op, struct flock *fl)
|
||||||
thr->detach ();
|
thr->detach ();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Signal arrived. */
|
/* Signal arrived.
|
||||||
/* Starting with Vista, CancelSynchronousIo works, and we wait
|
If CancelSynchronousIo works we wait for the thread to exit.
|
||||||
for the thread to exit. lp.status will be either
|
lp.status will be either STATUS_SUCCESS, or STATUS_CANCELLED.
|
||||||
STATUS_SUCCESS, or STATUS_CANCELLED. We only call
|
We only call NtUnlockFile in the first case.
|
||||||
NtUnlockFile in the first case.
|
If CancelSynchronousIo fails we terminated the thread and
|
||||||
Prior to Vista, CancelSynchronousIo doesn't exist, so we
|
call NtUnlockFile since lp.status was 0 to begin with. */
|
||||||
terminated the thread and always call NtUnlockFile since
|
|
||||||
lp.status was 0 to begin with. */
|
|
||||||
if (CancelSynchronousIo (thr->thread_handle ()))
|
if (CancelSynchronousIo (thr->thread_handle ()))
|
||||||
thr->detach ();
|
thr->detach ();
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue