Skip to content

Commit f47966b

Browse files
authored
[compiler-rt] Reland "SetThreadName implementation for Fuchsia" (llvm#105179)
1 parent d7c84d7 commit f47966b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,11 @@ size_t PageSize() {
607607
}
608608

609609
void SetThreadName(std::thread &thread, const std::string &name) {
610-
// TODO ?
610+
if (zx_status_t s = zx_object_set_property(
611+
thread.native_handle(), ZX_PROP_NAME, name.data(), name.size());
612+
s != ZX_OK)
613+
Printf("SetThreadName for name %s failed: %s", name.c_str(),
614+
zx_status_get_string(s));
611615
}
612616

613617
} // namespace fuzzer

0 commit comments

Comments
 (0)