Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan-Jowett committed Dec 17, 2024
1 parent 43b9bd2 commit 0f29f55
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/ke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ KeSetSystemAffinityThreadEx(KAFFINITY affinity)
} else {
bool result = usersim_set_current_thread_affinity(&new_affinity, &old_affinity);
if (result) {
return (KAFFINITY)old_affinity.Mask;
return old_affinity.Mask;
} else {
return 0;
}
Expand Down Expand Up @@ -392,7 +392,12 @@ KeSetSystemGroupAffinityThread(_In_ const PGROUP_AFFINITY Affinity, _Out_opt_ PG
void
KeRevertToUserGroupAffinityThread(PGROUP_AFFINITY PreviousAffinity)
{
(void)usersim_set_current_thread_affinity(PreviousAffinity, nullptr);
bool result = usersim_set_current_thread_affinity(PreviousAffinity, nullptr);
#if defined(NDEBUG)
UNREFERENCED_PARAMETER(result);
#else
assert(result);
#endif
}

PKTHREAD
Expand Down Expand Up @@ -654,10 +659,10 @@ class _usersim_emulated_dpc

l.unlock();
_usersim_dispatch_locks[i].lock();
//_usersim_current_irql = DISPATCH_LEVEL;
_usersim_current_irql = DISPATCH_LEVEL;
work_item->work_item_routine(work_item, context, parameter_1, parameter_2);
_usersim_dispatch_locks[i].unlock();
//_usersim_current_irql = PASSIVE_LEVEL;
_usersim_current_irql = PASSIVE_LEVEL;
l.lock();
}
}
Expand Down

0 comments on commit 0f29f55

Please sign in to comment.