Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6420ebdf
Commit
6420ebdf
authored
Jul 31, 2019
by
Chip Davis
Committed by
Alexandre Julliard
Aug 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move SetThreadExecutionState() implementation to ntdll.
Signed-off-by:
Chip Davis
<
cdavis@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4e4aa467
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
8 deletions
+23
-8
powermgnt.c
dlls/kernel32/powermgnt.c
+3
-6
nt.c
dlls/ntdll/nt.c
+17
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+2
-2
winternl.h
include/winternl.h
+1
-0
No files found.
dlls/kernel32/powermgnt.c
View file @
6420ebdf
...
...
@@ -21,6 +21,7 @@
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
powermgnt
);
...
...
@@ -100,14 +101,10 @@ BOOL WINAPI SetSystemPowerState(BOOL suspend_or_hibernate,
*/
EXECUTION_STATE
WINAPI
SetThreadExecutionState
(
EXECUTION_STATE
flags
)
{
static
EXECUTION_STATE
current
=
ES_SYSTEM_REQUIRED
|
ES_DISPLAY_REQUIRED
|
ES_USER_PRESENT
;
EXECUTION_STATE
old
=
current
;
EXECUTION_STATE
old
;
WARN
(
"(0x%x): stub, harmless.
\n
"
,
flags
);
NtSetThreadExecutionState
(
flags
,
&
old
);
if
(
!
(
current
&
ES_CONTINUOUS
)
||
(
flags
&
ES_CONTINUOUS
))
current
=
flags
;
return
old
;
}
...
...
dlls/ntdll/nt.c
View file @
6420ebdf
...
...
@@ -3056,6 +3056,23 @@ NTSTATUS WINAPI NtInitiatePowerAction(
return
STATUS_NOT_IMPLEMENTED
;
}
/******************************************************************************
* NtSetThreadExecutionState [NTDLL.@]
*
*/
NTSTATUS
WINAPI
NtSetThreadExecutionState
(
EXECUTION_STATE
new_state
,
EXECUTION_STATE
*
old_state
)
{
static
EXECUTION_STATE
current
=
ES_SYSTEM_REQUIRED
|
ES_DISPLAY_REQUIRED
|
ES_USER_PRESENT
;
*
old_state
=
current
;
WARN
(
"(0x%x, %p): stub, harmless.
\n
"
,
new_state
,
old_state
);
if
(
!
(
current
&
ES_CONTINUOUS
)
||
(
new_state
&
ES_CONTINUOUS
))
current
=
new_state
;
return
STATUS_SUCCESS
;
}
#ifdef linux
/* Fallback using /proc/cpuinfo for Linux systems without cpufreq. For
* most distributions on recent enough hardware, this is only likely to
...
...
dlls/ntdll/ntdll.spec
View file @
6420ebdf
...
...
@@ -381,7 +381,7 @@
@ stdcall NtSetSystemInformation(long ptr long)
@ stub NtSetSystemPowerState
@ stdcall NtSetSystemTime(ptr ptr)
# @ stub NtSetThreadExecutionState
@ stdcall NtSetThreadExecutionState(long ptr)
@ stdcall NtSetTimer(long ptr ptr ptr long long ptr)
@ stdcall NtSetTimerResolution(long long ptr)
# @ stub NtSetUuidSeed
...
...
@@ -1330,7 +1330,7 @@
@ stdcall -private ZwSetSystemInformation(long ptr long) NtSetSystemInformation
@ stub ZwSetSystemPowerState
@ stdcall -private ZwSetSystemTime(ptr ptr) NtSetSystemTime
# @ stub Zw
SetThreadExecutionState
@ stdcall ZwSetThreadExecutionState(long ptr) Nt
SetThreadExecutionState
@ stdcall -private ZwSetTimer(long ptr ptr ptr long long ptr) NtSetTimer
@ stdcall -private ZwSetTimerResolution(long long ptr) NtSetTimerResolution
# @ stub ZwSetUuidSeed
...
...
include/winternl.h
View file @
6420ebdf
...
...
@@ -2515,6 +2515,7 @@ NTSYSAPI NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_S
NTSYSAPI
NTSTATUS
WINAPI
NtSetSystemInformation
(
SYSTEM_INFORMATION_CLASS
,
PVOID
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetSystemPowerState
(
POWER_ACTION
,
SYSTEM_POWER_STATE
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetSystemTime
(
const
LARGE_INTEGER
*
,
LARGE_INTEGER
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetThreadExecutionState
(
EXECUTION_STATE
,
EXECUTION_STATE
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetTimer
(
HANDLE
,
const
LARGE_INTEGER
*
,
PTIMER_APC_ROUTINE
,
PVOID
,
BOOLEAN
,
ULONG
,
BOOLEAN
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetTimerResolution
(
ULONG
,
BOOLEAN
,
PULONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetValueKey
(
HANDLE
,
const
UNICODE_STRING
*
,
ULONG
,
ULONG
,
const
void
*
,
ULONG
);
...
...
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