[compiler-rt] 291e3a8 - [compiler-rt] Update Fuchsia sanitizer sched_yield
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 10:26:07 PDT 2022
Author: Petr Hosek
Date: 2022-07-01T17:25:57Z
New Revision: 291e3a85658e264a2918298e804972bd68681af8
URL: https://github.com/llvm/llvm-project/commit/291e3a85658e264a2918298e804972bd68681af8
DIFF: https://github.com/llvm/llvm-project/commit/291e3a85658e264a2918298e804972bd68681af8.diff
LOG: [compiler-rt] Update Fuchsia sanitizer sched_yield
Fuchsia has split overloaded nanosleep(0) for yielding to its own
dedicated syscall, so valid zero deadlines would just return.
Patch By: gevalentino
Differential Revision: https://reviews.llvm.org/D128748
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
index d8cf93ecbeca2..e253b67fc484f 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
@@ -32,7 +32,7 @@ namespace __sanitizer {
void NORETURN internal__exit(int exitcode) { _zx_process_exit(exitcode); }
uptr internal_sched_yield() {
- zx_status_t status = _zx_nanosleep(0);
+ zx_status_t status = _zx_thread_legacy_yield(0u);
CHECK_EQ(status, ZX_OK);
return 0; // Why doesn't this return void?
}
More information about the llvm-commits
mailing list