[compiler-rt] Reland "SetThreadName implementation for Fuchsia" (#105179)

This commit is contained in:
David CARLIER 2024-08-21 08:37:26 +01:00 committed by GitHub
parent d7c84d7b71
commit f47966b1de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -607,7 +607,11 @@ size_t PageSize() {
}
void SetThreadName(std::thread &thread, const std::string &name) {
// TODO ?
if (zx_status_t s = zx_object_set_property(
thread.native_handle(), ZX_PROP_NAME, name.data(), name.size());
s != ZX_OK)
Printf("SetThreadName for name %s failed: %s", name.c_str(),
zx_status_get_string(s));
}
} // namespace fuzzer