If we'd pretend for a second we can just remove spin lock there, it wouldn't change anything in that code once we use NtAlertMultipleThreadByThreadId to group wakes? We'd be still adding to an array while we can, calling NtAlertMultipleThreadByThreadId if it overflows or after the loop to submit what we have left.
Correct. But it *does* change where we put the lock/unlock. We could unlock after doing the final alert, but we explicitly don't want to do that.