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
cbefdefb
Commit
cbefdefb
authored
Aug 12, 2003
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Aug 12, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consolidate all kernel power management functions.
Provide prototypes and stubs for missing functions.
parent
b5bd66e8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
62 deletions
+113
-62
Makefile.in
dlls/kernel/Makefile.in
+1
-0
kernel32.spec
dlls/kernel/kernel32.spec
+2
-2
powermgnt.c
dlls/kernel/powermgnt.c
+100
-0
thread.c
dlls/kernel/thread.c
+0
-19
winbase.h
include/winbase.h
+2
-0
winnt.h
include/winnt.h
+7
-0
newfns.c
win32/newfns.c
+1
-41
No files found.
dlls/kernel/Makefile.in
View file @
cbefdefb
...
...
@@ -34,6 +34,7 @@ C_SRCS = \
lcformat.c
\
local16.c
\
locale.c
\
powermgnt.c
\
process.c
\
resource.c
\
resource16.c
\
...
...
dlls/kernel/kernel32.spec
View file @
cbefdefb
...
...
@@ -573,7 +573,7 @@
@ stdcall IsDBCSLeadByteEx(long long)
@ stub IsLSCallback
@ stub IsSLCallback
@ st
ub IsSystemResumeAutomatic
@ st
dcall IsSystemResumeAutomatic()
@ stdcall IsValidCodePage(long)
@ stub IsValidLanguageGroup
@ stdcall IsValidLocale(long long)
...
...
@@ -691,7 +691,7 @@
@ stdcall RemoveDirectoryA(str)
@ stdcall RemoveDirectoryW(wstr)
@ stub RequestDeviceWakeup
@ st
ub RequestWakeupLatency
@ st
dcall RequestWakeupLatency(long)
@ stdcall ResetEvent(long)
@ stub ResetWriteWatch
@ stdcall ResumeThread(long)
...
...
dlls/kernel/powermgnt.c
0 → 100644
View file @
cbefdefb
/*
* Copyright 1995 Thomas Sandford (tdgsandf@prds-grn.demon.co.uk)
* Copyright 2003 Dimitrie O. Paun
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "winbase.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
powermgnt
);
/******************************************************************************
* GetDevicePowerState (KERNEL32.@)
*/
BOOL
WINAPI
GetDevicePowerState
(
HANDLE
hDevice
,
BOOL
*
pfOn
)
{
FIXME
(
"(hDevice %p pfOn %p): stub
\n
"
,
hDevice
,
pfOn
);
return
TRUE
;
/* no information */
}
/***********************************************************************
* GetSystemPowerStatus (KERNEL32.@)
*/
BOOL
WINAPI
GetSystemPowerStatus
(
LPSYSTEM_POWER_STATUS
sps_ptr
)
{
FIXME
(
"(): stub, harmless.
\n
"
);
return
FALSE
;
/* no power management support */
}
/***********************************************************************
* IsSystemResumeAutomatic (KERNEL32.@)
*/
BOOL
WINAPI
IsSystemResumeAutomatic
(
void
)
{
FIXME
(
"(): stub, harmless.
\n
"
);
return
FALSE
;
}
/***********************************************************************
* RequestWakeupLatency (KERNEL32.@)
*/
BOOL
WINAPI
RequestWakeupLatency
(
LATENCY_TIME
latency
)
{
FIXME
(
"(): stub, harmless.
\n
"
);
return
TRUE
;
}
/***********************************************************************
* SetSystemPowerState (KERNEL32.@)
*/
BOOL
WINAPI
SetSystemPowerState
(
BOOL
suspend_or_hibernate
,
BOOL
force_flag
)
{
FIXME
(
"(): stub, harmless.
\n
"
);
/* suspend_or_hibernate flag: w95 does not support
this feature anyway */
for
(
;
0
;
)
{
if
(
force_flag
)
{
}
else
{
}
}
return
TRUE
;
}
/***********************************************************************
* SetThreadExecutionState (KERNEL32.@)
*
* Informs the system that activity is taking place for
* power management purposes.
*/
EXECUTION_STATE
WINAPI
SetThreadExecutionState
(
EXECUTION_STATE
flags
)
{
static
EXECUTION_STATE
current
=
ES_SYSTEM_REQUIRED
|
ES_DISPLAY_REQUIRED
|
ES_USER_PRESENT
;
EXECUTION_STATE
old
=
current
;
FIXME
(
"(0x%lx): stub, harmless.
\n
"
,
flags
);
if
(
!
(
current
&
ES_CONTINUOUS
)
||
(
flags
&
ES_CONTINUOUS
))
current
=
flags
;
return
old
;
}
dlls/kernel/thread.c
View file @
cbefdefb
...
...
@@ -238,25 +238,6 @@ DWORD WINAPI SetThreadIdealProcessor(
}
/***********************************************************************
* SetThreadExecutionState (KERNEL32.@)
*
* Informs the system that activity is taking place for
* power management purposes.
*/
EXECUTION_STATE
WINAPI
SetThreadExecutionState
(
EXECUTION_STATE
flags
)
{
static
EXECUTION_STATE
current
=
ES_SYSTEM_REQUIRED
|
ES_DISPLAY_REQUIRED
|
ES_USER_PRESENT
;
EXECUTION_STATE
old
=
current
;
if
(
!
(
current
&
ES_CONTINUOUS
)
||
(
flags
&
ES_CONTINUOUS
))
current
=
flags
;
FIXME
(
"(0x%lx): stub, harmless (power management).
\n
"
,
flags
);
return
old
;
}
/* callback for QueueUserAPC */
static
void
CALLBACK
call_user_apc
(
ULONG_PTR
arg1
,
ULONG_PTR
arg2
,
ULONG_PTR
arg3
)
{
...
...
include/winbase.h
View file @
cbefdefb
...
...
@@ -1441,6 +1441,7 @@ BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY);
DWORD
WINAPI
InitializeAcl
(
PACL
,
DWORD
,
DWORD
);
BOOL
WINAPI
InitializeSecurityDescriptor
(
PSECURITY_DESCRIPTOR
,
DWORD
);
BOOL
WINAPI
InitializeSid
(
PSID
,
PSID_IDENTIFIER_AUTHORITY
,
BYTE
);
BOOL
WINAPI
IsSystemResumeAutomatic
(
void
);
BOOL
WINAPI
IsTextUnicode
(
CONST
LPVOID
lpBuffer
,
int
cb
,
LPINT
lpi
);
BOOL
WINAPI
IsValidSecurityDescriptor
(
PSECURITY_DESCRIPTOR
);
BOOL
WINAPI
IsValidSid
(
PSID
);
...
...
@@ -1514,6 +1515,7 @@ BOOL WINAPI ReleaseMutex(HANDLE);
BOOL
WINAPI
ReleaseSemaphore
(
HANDLE
,
LONG
,
LPLONG
);
BOOL
WINAPI
ReportEventA
(
HANDLE
,
WORD
,
WORD
,
DWORD
,
PSID
,
WORD
,
DWORD
,
LPCSTR
*
,
LPVOID
);
BOOL
WINAPI
ReportEventW
(
HANDLE
,
WORD
,
WORD
,
DWORD
,
PSID
,
WORD
,
DWORD
,
LPCWSTR
*
,
LPVOID
);
BOOL
WINAPI
RequestWakeupLatency
(
LATENCY_TIME
latency
);
#define ReportEvent WINELIB_NAME_AW(ReportEvent)
BOOL
WINAPI
ResetEvent
(
HANDLE
);
DWORD
WINAPI
ResumeThread
(
HANDLE
);
...
...
include/winnt.h
View file @
cbefdefb
...
...
@@ -3375,6 +3375,13 @@ typedef enum tagSID_NAME_USE {
#define REG_QWORD 11
/* QWORD in little endian format */
#define REG_QWORD_LITTLE_ENDIAN 11
/* QWORD in little endian format */
/* ----------------------------- begin power management --------------------- */
typedef
enum
_LATENCY_TIME
{
LT_DONT_CARE
,
LT_LOWEST_LATENCY
}
LATENCY_TIME
,
*
PLATENCY_TIME
;
/* ----------------------------- begin registry ----------------------------- */
/* Registry security values */
...
...
win32/newfns.c
View file @
cbefdefb
...
...
@@ -42,7 +42,6 @@ at a later date. */
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
win32
);
WINE_DECLARE_DEBUG_CHANNEL
(
debug
);
/****************************************************************************
...
...
@@ -51,37 +50,7 @@ WINE_DECLARE_DEBUG_CHANNEL(debug);
BOOL
WINAPI
FlushInstructionCache
(
HANDLE
hProcess
,
LPCVOID
lpBaseAddress
,
SIZE_T
dwSize
)
{
if
(
GetVersion
()
&
0x80000000
)
return
TRUE
;
/* not NT, always TRUE */
FIXME_
(
debug
)(
"(0x%08lx,%p,0x%08lx): stub
\n
"
,(
DWORD
)
hProcess
,
lpBaseAddress
,
dwSize
);
return
TRUE
;
}
/***********************************************************************
* GetSystemPowerStatus (KERNEL32.@)
*/
BOOL
WINAPI
GetSystemPowerStatus
(
LPSYSTEM_POWER_STATUS
sps_ptr
)
{
return
FALSE
;
/* no power management support */
}
/***********************************************************************
* SetSystemPowerState (KERNEL32.@)
*/
BOOL
WINAPI
SetSystemPowerState
(
BOOL
suspend_or_hibernate
,
BOOL
force_flag
)
{
/* suspend_or_hibernate flag: w95 does not support
this feature anyway */
for
(
;
0
;
)
{
if
(
force_flag
)
{
}
else
{
}
}
FIXME
(
"(%p,%p,0x%08lx): stub
\n
"
,
hProcess
,
lpBaseAddress
,
dwSize
);
return
TRUE
;
}
...
...
@@ -201,15 +170,6 @@ BOOL WINAPI GetQueuedCompletionStatus(
return
FALSE
;
}
/******************************************************************************
* GetDevicePowerState (KERNEL32.@)
*/
BOOL
WINAPI
GetDevicePowerState
(
HANDLE
hDevice
,
BOOL
*
pfOn
)
{
FIXME
(
"(hDevice %p pfOn %p): stub
\n
"
,
hDevice
,
pfOn
);
return
TRUE
;
/* no information */
}
/***********************************************************************
* Beep (KERNEL32.@)
*/
...
...
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