Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8b0a7b25
Commit
8b0a7b25
authored
Dec 16, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix RtlQueryUnbiasedInterruptTime() prototype.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48239
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6233add3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
3 deletions
+43
-3
time.c
dlls/kernel32/tests/time.c
+35
-0
time.c
dlls/ntdll/time.c
+7
-2
winternl.h
include/winternl.h
+1
-1
No files found.
dlls/kernel32/tests/time.c
View file @
8b0a7b25
...
@@ -1027,6 +1027,38 @@ static void test_GetTickCount(void)
...
@@ -1027,6 +1027,38 @@ static void test_GetTickCount(void)
ok
(
t2
<=
t3
,
"out of order %d %d
\n
"
,
t2
,
t3
);
ok
(
t2
<=
t3
,
"out of order %d %d
\n
"
,
t2
,
t3
);
}
}
BOOL
(
WINAPI
*
pQueryUnbiasedInterruptTime
)(
ULONGLONG
*
time
);
BOOL
(
WINAPI
*
pRtlQueryUnbiasedInterruptTime
)(
ULONGLONG
*
time
);
static
void
test_QueryUnbiasedInterruptTime
(
void
)
{
ULONGLONG
time
;
BOOL
ret
;
if
(
pQueryUnbiasedInterruptTime
)
{
SetLastError
(
0xdeadbeef
);
ret
=
pQueryUnbiasedInterruptTime
(
&
time
);
ok
(
ret
,
"QueryUnbiasedInterruptTime failed err %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
pQueryUnbiasedInterruptTime
(
NULL
);
ok
(
!
ret
,
"QueryUnbiasedInterruptTime succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"wrong error %u
\n
"
,
GetLastError
()
);
}
else
win_skip
(
"QueryUnbiasedInterruptTime not supported
\n
"
);
if
(
pRtlQueryUnbiasedInterruptTime
)
{
SetLastError
(
0xdeadbeef
);
ret
=
pRtlQueryUnbiasedInterruptTime
(
&
time
);
ok
(
ret
,
"RtlQueryUnbiasedInterruptTime failed err %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
pRtlQueryUnbiasedInterruptTime
(
NULL
);
ok
(
!
ret
,
"RtlQueryUnbiasedInterruptTime succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"wrong error %u
\n
"
,
GetLastError
()
);
}
else
win_skip
(
"RtlQueryUnbiasedInterruptTime not supported
\n
"
);
}
START_TEST
(
time
)
START_TEST
(
time
)
{
{
HMODULE
hKernel
=
GetModuleHandleA
(
"kernel32"
);
HMODULE
hKernel
=
GetModuleHandleA
(
"kernel32"
);
...
@@ -1039,7 +1071,9 @@ START_TEST(time)
...
@@ -1039,7 +1071,9 @@ START_TEST(time)
pGetDynamicTimeZoneInformation
=
(
void
*
)
GetProcAddress
(
hKernel
,
"GetDynamicTimeZoneInformation"
);
pGetDynamicTimeZoneInformation
=
(
void
*
)
GetProcAddress
(
hKernel
,
"GetDynamicTimeZoneInformation"
);
pGetSystemTimePreciseAsFileTime
=
(
void
*
)
GetProcAddress
(
hKernel
,
"GetSystemTimePreciseAsFileTime"
);
pGetSystemTimePreciseAsFileTime
=
(
void
*
)
GetProcAddress
(
hKernel
,
"GetSystemTimePreciseAsFileTime"
);
pGetTimeZoneInformationForYear
=
(
void
*
)
GetProcAddress
(
hKernel
,
"GetTimeZoneInformationForYear"
);
pGetTimeZoneInformationForYear
=
(
void
*
)
GetProcAddress
(
hKernel
,
"GetTimeZoneInformationForYear"
);
pQueryUnbiasedInterruptTime
=
(
void
*
)
GetProcAddress
(
hKernel
,
"QueryUnbiasedInterruptTime"
);
pNtGetTickCount
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtGetTickCount"
);
pNtGetTickCount
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtGetTickCount"
);
pRtlQueryUnbiasedInterruptTime
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlQueryUnbiasedInterruptTime"
);
test_conversions
();
test_conversions
();
test_invalid_arg
();
test_invalid_arg
();
...
@@ -1055,4 +1089,5 @@ START_TEST(time)
...
@@ -1055,4 +1089,5 @@ START_TEST(time)
test_GetSystemTimePreciseAsFileTime
();
test_GetSystemTimePreciseAsFileTime
();
test_GetTimeZoneInformationForYear
();
test_GetTimeZoneInformationForYear
();
test_GetTickCount
();
test_GetTickCount
();
test_QueryUnbiasedInterruptTime
();
}
}
dlls/ntdll/time.c
View file @
8b0a7b25
...
@@ -1121,8 +1121,13 @@ NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER *NewTime, LARGE_INTEGER *Old
...
@@ -1121,8 +1121,13 @@ NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER *NewTime, LARGE_INTEGER *Old
/***********************************************************************
/***********************************************************************
* RtlQueryUnbiasedInterruptTime [NTDLL.@]
* RtlQueryUnbiasedInterruptTime [NTDLL.@]
*/
*/
NTSTATUS
WINAPI
RtlQueryUnbiasedInterruptTime
(
ULONGLONG
*
time
)
BOOL
WINAPI
RtlQueryUnbiasedInterruptTime
(
ULONGLONG
*
time
)
{
{
if
(
!
time
)
{
RtlSetLastWin32ErrorAndNtStatusFromNtStatus
(
STATUS_INVALID_PARAMETER
);
return
FALSE
;
}
*
time
=
monotonic_counter
();
*
time
=
monotonic_counter
();
return
STATUS_SUCCESS
;
return
TRUE
;
}
}
include/winternl.h
View file @
8b0a7b25
...
@@ -2849,7 +2849,7 @@ NTSYSAPI BOOL WINAPI RtlQueryPerformanceFrequency(LARGE_INTEGER*);
...
@@ -2849,7 +2849,7 @@ NTSYSAPI BOOL WINAPI RtlQueryPerformanceFrequency(LARGE_INTEGER*);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueryProcessDebugInformation
(
ULONG
,
ULONG
,
PDEBUG_BUFFER
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueryProcessDebugInformation
(
ULONG
,
ULONG
,
PDEBUG_BUFFER
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueryRegistryValues
(
ULONG
,
PCWSTR
,
PRTL_QUERY_REGISTRY_TABLE
,
PVOID
,
PVOID
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueryRegistryValues
(
ULONG
,
PCWSTR
,
PRTL_QUERY_REGISTRY_TABLE
,
PVOID
,
PVOID
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueryTimeZoneInformation
(
RTL_TIME_ZONE_INFORMATION
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueryTimeZoneInformation
(
RTL_TIME_ZONE_INFORMATION
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueryUnbiasedInterruptTime
(
ULONGLONG
*
);
NTSYSAPI
BOOL
WINAPI
RtlQueryUnbiasedInterruptTime
(
ULONGLONG
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueueWorkItem
(
PRTL_WORK_ITEM_ROUTINE
,
PVOID
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueueWorkItem
(
PRTL_WORK_ITEM_ROUTINE
,
PVOID
,
ULONG
);
NTSYSAPI
void
WINAPI
RtlRaiseException
(
PEXCEPTION_RECORD
);
NTSYSAPI
void
WINAPI
RtlRaiseException
(
PEXCEPTION_RECORD
);
NTSYSAPI
void
WINAPI
RtlRaiseStatus
(
NTSTATUS
);
NTSYSAPI
void
WINAPI
RtlRaiseStatus
(
NTSTATUS
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment