mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 04:13:35 +00:00
1. implemented SetProcessWorkingSetSize()
2. fixed Set/GetPriorityClass() not to call csrss and use NtSet/QueryInformationProcess() instead svn path=/trunk/; revision=10921
This commit is contained in:
@@ -5,11 +5,6 @@
|
||||
#include <ddk/ntddblue.h>
|
||||
#include <ntos.h>
|
||||
|
||||
#define CSR_PRIORITY_CLASS_NORMAL (0x10)
|
||||
#define CSR_PRIORITY_CLASS_IDLE (0x20)
|
||||
#define CSR_PRIORITY_CLASS_HIGH (0x40)
|
||||
#define CSR_PRIORITY_CLASS_REALTIME (0x80)
|
||||
|
||||
#define CSR_CSRSS_SECTION_SIZE (65536)
|
||||
|
||||
typedef __declspec(noreturn) VOID CALLBACK(*PCONTROLDISPATCHER)(DWORD);
|
||||
|
||||
@@ -5049,16 +5049,16 @@ WINBOOL
|
||||
STDCALL
|
||||
GetProcessWorkingSetSize(
|
||||
HANDLE hProcess,
|
||||
LPDWORD lpMinimumWorkingSetSize,
|
||||
LPDWORD lpMaximumWorkingSetSize
|
||||
PSIZE_T lpMinimumWorkingSetSize,
|
||||
PSIZE_T lpMaximumWorkingSetSize
|
||||
);
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetProcessWorkingSetSize(
|
||||
HANDLE hProcess,
|
||||
DWORD dwMinimumWorkingSetSize,
|
||||
DWORD dwMaximumWorkingSetSize
|
||||
SIZE_T dwMinimumWorkingSetSize,
|
||||
SIZE_T dwMaximumWorkingSetSize
|
||||
);
|
||||
|
||||
HANDLE
|
||||
|
||||
@@ -26,6 +26,14 @@
|
||||
#define THREAD_PRIORITY_IDLE (-15)
|
||||
#define THREAD_PRIORITY_LOWEST (-2)
|
||||
|
||||
/* Process priority classes */
|
||||
#define PROCESS_PRIORITY_CLASS_HIGH (4) /* FIXME */
|
||||
#define PROCESS_PRIORITY_CLASS_IDLE (0) /* FIXME */
|
||||
#define PROCESS_PRIORITY_CLASS_NORMAL (2) /* FIXME */
|
||||
#define PROCESS_PRIORITY_CLASS_REALTIME (5) /* FIXME */
|
||||
#define PROCESS_PRIORITY_CLASS_BELOW_NORMAL (1) /* FIXME */
|
||||
#define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL (3) /* FIXME */
|
||||
|
||||
#ifndef __USE_W32API
|
||||
|
||||
/* Thread access rights */
|
||||
@@ -77,6 +85,8 @@
|
||||
#define IDLE_PRIORITY_CLASS (64)
|
||||
#define NORMAL_PRIORITY_CLASS (32)
|
||||
#define REALTIME_PRIORITY_CLASS (256)
|
||||
#define BELOW_NORMAL_PRIORITY_CLASS (16384)
|
||||
#define ABOVE_NORMAL_PRIORITY_CLASS (32768)
|
||||
|
||||
/* ResumeThread / SuspendThread */
|
||||
#define MAXIMUM_SUSPEND_COUNT (0x7f)
|
||||
|
||||
@@ -646,8 +646,8 @@ typedef struct _QUOTA_LIMITS
|
||||
{
|
||||
ULONG PagedPoolLimit;
|
||||
ULONG NonPagedPoolLimit;
|
||||
ULONG MinimumWorkingSetSize;
|
||||
ULONG MaximumWorkingSetSize;
|
||||
SIZE_T MinimumWorkingSetSize;
|
||||
SIZE_T MaximumWorkingSetSize;
|
||||
ULONG PagefileLimit;
|
||||
TIME TimeLimit;
|
||||
} QUOTA_LIMITS, *PQUOTA_LIMITS;
|
||||
|
||||
Reference in New Issue
Block a user