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
8ca9e0b1
Commit
8ca9e0b1
authored
May 21, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use the user shared data to implement GetTickCount().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6a1667fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+2
-2
sync.c
dlls/kernelbase/sync.c
+30
-0
No files found.
dlls/kernelbase/kernelbase.spec
View file @
8ca9e0b1
...
...
@@ -725,8 +725,8 @@
# @ stub GetThreadSelectedCpuSets
@ stdcall GetThreadTimes(long ptr ptr ptr ptr)
@ stdcall GetThreadUILanguage()
@ stdcall GetTickCount()
kernel32.GetTickCount
@ stdcall -ret64 GetTickCount64()
kernel32.GetTickCount64
@ stdcall GetTickCount()
@ stdcall -ret64 GetTickCount64()
@ stdcall GetTimeFormatA(long long ptr str ptr long) kernel32.GetTimeFormatA
@ stdcall GetTimeFormatEx(wstr long ptr wstr ptr long) kernel32.GetTimeFormatEx
@ stdcall GetTimeFormatW(long long ptr wstr ptr long) kernel32.GetTimeFormatW
...
...
dlls/kernelbase/sync.c
View file @
8ca9e0b1
...
...
@@ -42,6 +42,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
sync
);
static
const
struct
_KUSER_SHARED_DATA
*
user_shared_data
=
(
struct
_KUSER_SHARED_DATA
*
)
0x7ffe0000
;
/* check if current version is NT or Win95 */
static
inline
BOOL
is_version_nt
(
void
)
{
...
...
@@ -126,6 +128,34 @@ static BOOL get_open_object_attributes( OBJECT_ATTRIBUTES *attr, UNICODE_STRING
***********************************************************************/
/******************************************************************************
* GetTickCount (kernelbase.@)
*/
ULONG
WINAPI
DECLSPEC_HOTPATCH
GetTickCount
(
void
)
{
/* note: we ignore TickCountMultiplier */
return
user_shared_data
->
u
.
TickCount
.
LowPart
;
}
/******************************************************************************
* GetTickCount64 (kernelbase.@)
*/
ULONGLONG
WINAPI
DECLSPEC_HOTPATCH
GetTickCount64
(
void
)
{
ULONG
high
,
low
;
do
{
high
=
user_shared_data
->
u
.
TickCount
.
High1Time
;
low
=
user_shared_data
->
u
.
TickCount
.
LowPart
;
}
while
(
high
!=
user_shared_data
->
u
.
TickCount
.
High2Time
);
/* note: we ignore TickCountMultiplier */
return
(
ULONGLONG
)
high
<<
32
|
low
;
}
static
HANDLE
normalize_handle_if_console
(
HANDLE
handle
)
{
static
HANDLE
wait_event
;
...
...
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