[PATCH v2 1/3] ntdll: Separate NtGetTickCount from get_tick_count64.
Alexandre Julliard
julliard at winehq.org
Thu May 30 04:19:21 CDT 2019
Huw Davies <huw at codeweavers.com> writes:
> On Thu, May 30, 2019 at 02:47:57AM -0500, Andrew Wesie wrote:
>> Signed-off-by: Andrew Wesie <awesie at gmail.com>
>> ---
>> dlls/ntdll/ntdll.spec | 7 +++++--
>> dlls/ntdll/ntdll_misc.h | 3 ---
>> dlls/ntdll/time.c | 8 ++++++--
>> include/winternl.h | 1 +
>> 4 files changed, 12 insertions(+), 7 deletions(-)
>>
>> diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
>> index 050ebc7..4ffb3c9 100644
>> --- a/dlls/ntdll/ntdll.spec
>> +++ b/dlls/ntdll/ntdll.spec
>> @@ -194,7 +194,7 @@
>> @ stdcall NtGetCurrentProcessorNumber()
>> # @ stub NtGetDevicePowerState
>> @ stub NtGetPlugPlayEvent
>> -@ stdcall -ret64 NtGetTickCount() get_tick_count64
>> +@ stdcall NtGetTickCount()
>> @ stdcall NtGetWriteWatch(long long ptr long ptr ptr ptr)
>> @ stdcall NtImpersonateAnonymousToken(long)
>> @ stub NtImpersonateClientOfPort
>> @@ -1142,7 +1142,7 @@
>> @ stdcall -private ZwGetCurrentProcessorNumber() NtGetCurrentProcessorNumber
>> # @ stub ZwGetDevicePowerState
>> @ stub ZwGetPlugPlayEvent
>> -@ stdcall -private -ret64 ZwGetTickCount() get_tick_count64
>> +@ stdcall -private ZwGetTickCount() NtGetTickCount
>> @ stdcall -private ZwGetWriteWatch(long long ptr long ptr ptr ptr) NtGetWriteWatch
>> @ stdcall -private ZwImpersonateAnonymousToken(long) NtImpersonateAnonymousToken
>> @ stub ZwImpersonateClientOfPort
>> @@ -1529,3 +1529,6 @@
>> # Filesystem
>> @ cdecl wine_nt_to_unix_file_name(ptr ptr long long)
>> @ cdecl wine_unix_to_nt_file_name(ptr ptr)
>> +
>> +# Time
>> +@ cdecl -ret64 wine_get_tick_count64()
>
> This will end up causing a performance regression (as well as having
> to add a Wine specific api to ntdll). I've sent in a patch that
> essentially duplicates monotonic_counter() in kernel32.
Is the extra function call really so expensive that it's worth the
duplication?
(Of course it should be calling a public API instead)
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list