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
78c772e9
Commit
78c772e9
authored
Jul 21, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use a syscall thunk for NtQueryPerformanceCounter().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4752e252
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
27 deletions
+15
-27
ntdll.spec
dlls/ntdll/ntdll.spec
+2
-2
time.c
dlls/ntdll/time.c
+1
-20
loader.c
dlls/ntdll/unix/loader.c
+0
-1
sync.c
dlls/ntdll/unix/sync.c
+11
-2
unixlib.h
dlls/ntdll/unixlib.h
+1
-2
No files found.
dlls/ntdll/ntdll.spec
View file @
78c772e9
...
@@ -307,7 +307,7 @@
...
@@ -307,7 +307,7 @@
@ stdcall -syscall NtQueryMutant(long long ptr long ptr)
@ stdcall -syscall NtQueryMutant(long long ptr long ptr)
@ stdcall -syscall NtQueryObject(long long ptr long ptr)
@ stdcall -syscall NtQueryObject(long long ptr long ptr)
@ stub NtQueryOpenSubKeys
@ stub NtQueryOpenSubKeys
@ stdcall NtQueryPerformanceCounter(ptr ptr)
@ stdcall
-syscall
NtQueryPerformanceCounter(ptr ptr)
# @ stub NtQueryPortInformationProcess
# @ stub NtQueryPortInformationProcess
# @ stub NtQueryQuotaInformationFile
# @ stub NtQueryQuotaInformationFile
@ stdcall -syscall NtQuerySection(long long ptr long ptr)
@ stdcall -syscall NtQuerySection(long long ptr long ptr)
...
@@ -1295,7 +1295,7 @@
...
@@ -1295,7 +1295,7 @@
@ stdcall -private -syscall ZwQueryMutant(long long ptr long ptr) NtQueryMutant
@ stdcall -private -syscall ZwQueryMutant(long long ptr long ptr) NtQueryMutant
@ stdcall -private -syscall ZwQueryObject(long long ptr long ptr) NtQueryObject
@ stdcall -private -syscall ZwQueryObject(long long ptr long ptr) NtQueryObject
@ stub ZwQueryOpenSubKeys
@ stub ZwQueryOpenSubKeys
@ stdcall -private ZwQueryPerformanceCounter(ptr ptr) NtQueryPerformanceCounter
@ stdcall -private
-syscall
ZwQueryPerformanceCounter(ptr ptr) NtQueryPerformanceCounter
# @ stub ZwQueryPortInformationProcess
# @ stub ZwQueryPortInformationProcess
# @ stub ZwQueryQuotaInformationFile
# @ stub ZwQueryQuotaInformationFile
@ stdcall -private -syscall ZwQuerySection(long long ptr long ptr) NtQuerySection
@ stdcall -private -syscall ZwQuerySection(long long ptr long ptr) NtQuerySection
...
...
dlls/ntdll/time.c
View file @
78c772e9
...
@@ -376,30 +376,11 @@ LONGLONG WINAPI RtlGetSystemTimePrecise( void )
...
@@ -376,30 +376,11 @@ LONGLONG WINAPI RtlGetSystemTimePrecise( void )
}
}
/******************************************************************************
/******************************************************************************
* NtQueryPerformanceCounter [NTDLL.@]
*/
NTSTATUS
WINAPI
NtQueryPerformanceCounter
(
LARGE_INTEGER
*
counter
,
LARGE_INTEGER
*
frequency
)
{
NTSTATUS
status
;
__TRY
{
status
=
unix_funcs
->
NtQueryPerformanceCounter
(
counter
,
frequency
);
}
__EXCEPT_PAGE_FAULT
{
return
STATUS_ACCESS_VIOLATION
;
}
__ENDTRY
return
status
;
}
/******************************************************************************
* RtlQueryPerformanceCounter [NTDLL.@]
* RtlQueryPerformanceCounter [NTDLL.@]
*/
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
RtlQueryPerformanceCounter
(
LARGE_INTEGER
*
counter
)
BOOL
WINAPI
DECLSPEC_HOTPATCH
RtlQueryPerformanceCounter
(
LARGE_INTEGER
*
counter
)
{
{
unix_funcs
->
NtQueryPerformanceCounter
(
counter
,
NULL
);
NtQueryPerformanceCounter
(
counter
,
NULL
);
return
TRUE
;
return
TRUE
;
}
}
...
...
dlls/ntdll/unix/loader.c
View file @
78c772e9
...
@@ -1362,7 +1362,6 @@ static struct unix_funcs unix_funcs =
...
@@ -1362,7 +1362,6 @@ static struct unix_funcs unix_funcs =
{
{
NtCurrentTeb
,
NtCurrentTeb
,
NtGetContextThread
,
NtGetContextThread
,
NtQueryPerformanceCounter
,
DbgUiIssueRemoteBreakin
,
DbgUiIssueRemoteBreakin
,
RtlGetSystemTimePrecise
,
RtlGetSystemTimePrecise
,
RtlWaitOnAddress
,
RtlWaitOnAddress
,
...
...
dlls/ntdll/unix/sync.c
View file @
78c772e9
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
#include "winternl.h"
#include "winternl.h"
#include "ddk/wdm.h"
#include "ddk/wdm.h"
#include "wine/server.h"
#include "wine/server.h"
#include "wine/exception.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "unix_private.h"
#include "unix_private.h"
...
@@ -1361,8 +1362,16 @@ NTSTATUS WINAPI NtDelayExecution( BOOLEAN alertable, const LARGE_INTEGER *timeou
...
@@ -1361,8 +1362,16 @@ NTSTATUS WINAPI NtDelayExecution( BOOLEAN alertable, const LARGE_INTEGER *timeou
*/
*/
NTSTATUS
WINAPI
NtQueryPerformanceCounter
(
LARGE_INTEGER
*
counter
,
LARGE_INTEGER
*
frequency
)
NTSTATUS
WINAPI
NtQueryPerformanceCounter
(
LARGE_INTEGER
*
counter
,
LARGE_INTEGER
*
frequency
)
{
{
counter
->
QuadPart
=
monotonic_counter
();
__TRY
if
(
frequency
)
frequency
->
QuadPart
=
TICKSPERSEC
;
{
counter
->
QuadPart
=
monotonic_counter
();
if
(
frequency
)
frequency
->
QuadPart
=
TICKSPERSEC
;
}
__EXCEPT_PAGE_FAULT
{
return
STATUS_ACCESS_VIOLATION
;
}
__ENDTRY
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
...
...
dlls/ntdll/unixlib.h
View file @
78c772e9
...
@@ -28,14 +28,13 @@ struct msghdr;
...
@@ -28,14 +28,13 @@ struct msghdr;
struct
_DISPATCHER_CONTEXT
;
struct
_DISPATCHER_CONTEXT
;
/* increment this when you change the function table */
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION
89
#define NTDLL_UNIXLIB_VERSION
90
struct
unix_funcs
struct
unix_funcs
{
{
/* Nt* functions */
/* Nt* functions */
TEB
*
(
WINAPI
*
NtCurrentTeb
)(
void
);
TEB
*
(
WINAPI
*
NtCurrentTeb
)(
void
);
NTSTATUS
(
WINAPI
*
NtGetContextThread
)(
HANDLE
handle
,
CONTEXT
*
context
);
NTSTATUS
(
WINAPI
*
NtGetContextThread
)(
HANDLE
handle
,
CONTEXT
*
context
);
NTSTATUS
(
WINAPI
*
NtQueryPerformanceCounter
)(
LARGE_INTEGER
*
counter
,
LARGE_INTEGER
*
frequency
);
/* other Win32 API functions */
/* other Win32 API functions */
NTSTATUS
(
WINAPI
*
DbgUiIssueRemoteBreakin
)(
HANDLE
process
);
NTSTATUS
(
WINAPI
*
DbgUiIssueRemoteBreakin
)(
HANDLE
process
);
...
...
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