ntoskrnl.exe: Implement KeRevertToUserAffinityThread() function.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2020-05-26 13:05:10 +03:00 committed by Alexandre Julliard
parent 7d4f4783a5
commit cda4fa293e
2 changed files with 12 additions and 2 deletions

View File

@ -2485,7 +2485,7 @@ KAFFINITY WINAPI KeSetSystemAffinityThreadEx(KAFFINITY affinity)
*/ */
void WINAPI KeRevertToUserAffinityThread(void) void WINAPI KeRevertToUserAffinityThread(void)
{ {
FIXME("() stub\n"); KeRevertToUserAffinityThreadEx(0);
} }
void WINAPI KeRevertToUserAffinityThreadEx(KAFFINITY affinity) void WINAPI KeRevertToUserAffinityThreadEx(KAFFINITY affinity)

View File

@ -1766,7 +1766,17 @@ static void test_affinity(void)
mask = pKeSetSystemAffinityThreadEx(0x1); mask = pKeSetSystemAffinityThreadEx(0x1);
ok(mask == mask_all_cpus, "Got unexpected mask %#lx.\n", mask); ok(mask == mask_all_cpus, "Got unexpected mask %#lx.\n", mask);
pKeRevertToUserAffinityThreadEx(mask_all_cpus); pKeRevertToUserAffinityThreadEx(0);
mask = pKeSetSystemAffinityThreadEx(0x1);
ok(!mask, "Got unexpected mask %#lx.\n", mask);
KeRevertToUserAffinityThread();
mask = pKeSetSystemAffinityThreadEx(0x1);
ok(!mask, "Got unexpected mask %#lx.\n", mask);
KeRevertToUserAffinityThread();
} }
static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack) static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack)