Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 +- dlls/ntoskrnl.exe/tests/driver.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index fc7828cf15..c4f2180c4c 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2485,7 +2485,7 @@ KAFFINITY WINAPI KeSetSystemAffinityThreadEx(KAFFINITY affinity) */ void WINAPI KeRevertToUserAffinityThread(void) { - FIXME("() stub\n"); + KeRevertToUserAffinityThreadEx(0); }
void WINAPI KeRevertToUserAffinityThreadEx(KAFFINITY affinity) diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 6b9b55732c..0c6a6d9561 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -1766,7 +1766,17 @@ static void test_affinity(void) mask = pKeSetSystemAffinityThreadEx(0x1); 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)