From: Marc-Aurel Zent mzent@codeweavers.com
--- dlls/ntdll/unix/process.c | 17 +++++++++++++++++ dlls/wow64/process.c | 1 + server/process.c | 1 + server/protocol.def | 8 +++++--- 4 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c index e4e000d385a..c2217c505d6 100644 --- a/dlls/ntdll/unix/process.c +++ b/dlls/ntdll/unix/process.c @@ -1755,6 +1755,23 @@ NTSTATUS WINAPI NtSetInformationProcess( HANDLE handle, PROCESSINFOCLASS class, } break;
+ case ProcessBasePriority: + if (size != sizeof(KPRIORITY)) return STATUS_INVALID_PARAMETER; + else + { + KPRIORITY* base_priority = info; + + SERVER_START_REQ( set_process_info ) + { + req->handle = wine_server_obj_handle( handle ); + req->base_priority = *base_priority; + req->mask = SET_PROCESS_INFO_BASE_PRIORITY; + ret = wine_server_call( req ); + } + SERVER_END_REQ; + } + break; + case ProcessExecuteFlags: if ((is_win64 && !is_wow64()) || size != sizeof(ULONG)) return STATUS_INVALID_PARAMETER; if (execute_flags & MEM_EXECUTE_OPTION_PERMANENT) return STATUS_ACCESS_DENIED; diff --git a/dlls/wow64/process.c b/dlls/wow64/process.c index 1843bdf5e84..957ca0d2691 100644 --- a/dlls/wow64/process.c +++ b/dlls/wow64/process.c @@ -890,6 +890,7 @@ NTSTATUS WINAPI wow64_NtSetInformationProcess( UINT *args ) { case ProcessDefaultHardErrorMode: /* ULONG */ case ProcessPriorityClass: /* PROCESS_PRIORITY_CLASS */ + case ProcessBasePriority: /* ULONG */ case ProcessExecuteFlags: /* ULONG */ case ProcessPagePriority: /* MEMORY_PRIORITY_INFORMATION */ case ProcessPowerThrottlingState: /* PROCESS_POWER_THROTTLING_STATE */ diff --git a/server/process.c b/server/process.c index 4f6e429551a..139cadd0065 100644 --- a/server/process.c +++ b/server/process.c @@ -1713,6 +1713,7 @@ DECL_HANDLER(set_process_info) if ((process = get_process_from_handle( req->handle, PROCESS_SET_INFORMATION ))) { if (req->mask & SET_PROCESS_INFO_PRIORITY) set_process_priority( process, req->priority ); + if (req->mask & SET_PROCESS_INFO_BASE_PRIORITY) set_process_base_priority( process, req->base_priority ); if (req->mask & SET_PROCESS_INFO_AFFINITY) set_process_affinity( process, req->affinity ); if (req->mask & SET_PROCESS_INFO_TOKEN) { diff --git a/server/protocol.def b/server/protocol.def index 63bb0111473..a47075f7543 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1203,12 +1203,14 @@ struct obj_locator obj_handle_t handle; /* process handle */ int mask; /* setting mask (see below) */ int priority; /* priority class */ + int base_priority; /* process base priority */ affinity_t affinity; /* affinity mask */ obj_handle_t token; /* primary token */ @END -#define SET_PROCESS_INFO_PRIORITY 0x01 -#define SET_PROCESS_INFO_AFFINITY 0x02 -#define SET_PROCESS_INFO_TOKEN 0x04 +#define SET_PROCESS_INFO_PRIORITY 0x01 +#define SET_PROCESS_INFO_BASE_PRIORITY 0x02 +#define SET_PROCESS_INFO_AFFINITY 0x04 +#define SET_PROCESS_INFO_TOKEN 0x08
/* Retrieve information about a thread */