Skip to content

Commit a919588

Browse files
authored
[compiler-rt][rtsan] NFC: Rename rtsan_on->rtsan_enable rtsan_off->rtsan_disable (#106727)
This better matches lsan_enable and disable, which we are trying to emulate.
1 parent 86a60e7 commit a919588

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

compiler-rt/lib/rtsan/rtsan.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_realtime_exit() {
5858
__rtsan::GetContextForThisThread().RealtimePop();
5959
}
6060

61-
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_off() {
61+
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_disable() {
6262
__rtsan::GetContextForThisThread().BypassPush();
6363
}
6464

65-
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_on() {
65+
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_enable() {
6666
__rtsan::GetContextForThisThread().BypassPop();
6767
}
6868

compiler-rt/lib/rtsan/rtsan.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_realtime_exit();
3838

3939
// Disable all RTSan error reporting.
4040
// Injected into the code if "nosanitize(realtime)" is on a function.
41-
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_off();
41+
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_disable();
4242

4343
// Re-enable all RTSan error reporting.
44-
// The counterpart to `__rtsan_off`.
45-
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_on();
44+
// The counterpart to `__rtsan_disable`.
45+
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_enable();
4646

4747
SANITIZER_INTERFACE_ATTRIBUTE void
4848
__rtsan_expect_not_realtime(const char *intercepted_function_name);

compiler-rt/lib/rtsan/tests/rtsan_test_functional.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ TEST(TestRtsan, ThrowingAnExceptionDiesWhenRealtime) {
204204
TEST(TestRtsan, DoesNotDieIfTurnedOff) {
205205
std::mutex mutex;
206206
auto RealtimeUnsafeFunc = [&]() {
207-
__rtsan_off();
207+
__rtsan_disable();
208208
mutex.lock();
209209
mutex.unlock();
210-
__rtsan_on();
210+
__rtsan_enable();
211211
};
212212
RealtimeInvoke(RealtimeUnsafeFunc);
213213
}

0 commit comments

Comments
 (0)