[Base] Check success of sync primitive creation
- Mainly use `assert`s, since failure is very rare - Forward failure of `CreateSemaphore` to guests because it is more easy to trigger with invalid initial parameters.
This commit is contained in:
@@ -66,7 +66,8 @@ static void set_name(HANDLE thread, const std::string_view name) {
|
||||
auto func =
|
||||
(SetThreadDescriptionFn)GetProcAddress(kernel, "SetThreadDescription");
|
||||
if (func) {
|
||||
func(thread, reinterpret_cast<PCWSTR>(xe::to_utf16(name).c_str()));
|
||||
auto u16name = xe::to_utf16(name);
|
||||
func(thread, reinterpret_cast<PCWSTR>(u16name.c_str()));
|
||||
}
|
||||
}
|
||||
raise_thread_name_exception(thread, std::string(name));
|
||||
|
||||
Reference in New Issue
Block a user