diff options
author | Ivan Zhakov <ivan@apache.org> | 2019-05-28 08:03:31 +0000 |
---|---|---|
committer | Ivan Zhakov <ivan@apache.org> | 2019-05-28 08:03:31 +0000 |
commit | e758bfc783c5a222c48aee5c7762dbd5392516a2 (patch) | |
tree | c0061fda6728b89f8da4cb4718307d643dd40a97 /include/arch | |
parent | 13bfb71d3d60b45a23471521dd8ea5d99e8af33b (diff) | |
download | apr-e758bfc783c5a222c48aee5c7762dbd5392516a2.tar.gz |
Windows platform: Use NtWaitForSingleObject() [1] directly to wait for kernel
object:
- NtWaitForSingleObject supports sub-milliseconds timeouts
- NtWaitForSingleObject supports timeouts more than 49 days
NtWaitForSingleObject is documented [1], but marked as 'deprecated' so we
still leave fallback code based on WaitForSingleObject().
[1] https://docs.microsoft.com/en-us/windows/desktop/api/winternl/nf-winternl-ntwaitforsingleobject
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860191 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/arch')
-rw-r--r-- | include/arch/win32/apr_arch_misc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/arch/win32/apr_arch_misc.h b/include/arch/win32/apr_arch_misc.h index 0f25b7995..407177c00 100644 --- a/include/arch/win32/apr_arch_misc.h +++ b/include/arch/win32/apr_arch_misc.h @@ -276,6 +276,15 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, LONG, WINAPI, NtQueryObject, 0, ( (hObject, info, pOI, LenOI, pSizeOI)); #define QueryObject apr_winapi_NtQueryObject +/* https://docs.microsoft.com/en-us/windows/desktop/api/winternl/nf-winternl-ntwaitforsingleobject */ +APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, LONG, WINAPI, NtWaitForSingleObject, 0, ( + HANDLE Handle, /* The handle to the wait object. */ + BOOLEAN Alertable, /* Specifies whether an alert can be delivered when + the object is waiting. */ + PLARGE_INTEGER Timeout),/* A pointer to an absolute or relative time over + which the wait is to occur. */ + (Handle, Alertable, Timeout)); + #ifdef CreateToolhelp32Snapshot #undef CreateToolhelp32Snapshot #endif |