NtSignalAndWaitForSingleObjectEx (untested).