Skip to content

Commit ec20696

Browse files
committed
Improve docs of rtsan enable/disable
1 parent 218b520 commit ec20696

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

compiler-rt/include/sanitizer/rtsan_interface.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ extern "C" {
2525
#endif // __cplusplus
2626

2727
// Disable all RTSan error reporting.
28+
// Must be paired with a call to `__rtsan_enable`
2829
void SANITIZER_CDECL __rtsan_disable(void);
2930

3031
// Re-enable all RTSan error reporting.
31-
// The counterpart to `__rtsan_disable`.
32+
// Must follow a call to `__rtsan_disable`.
3233
void SANITIZER_CDECL __rtsan_enable(void);
3334

3435
#ifdef __cplusplus
@@ -54,7 +55,7 @@ class ScopedDisabler {
5455
#endif // __cplusplus >= 201103L
5556
};
5657

57-
#else // doesn't have realtime_sanitizer
58+
#else
5859

5960
class ScopedDisabler {
6061
public:

compiler-rt/lib/rtsan/rtsan.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_disable();
4242
// See documentation in rtsan_interface.h.
4343
SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_enable();
4444

45-
// Expect that the next call to a function with the given name will not be
46-
// called from a realtime context.
4745
SANITIZER_INTERFACE_ATTRIBUTE void
4846
__rtsan_expect_not_realtime(const char *intercepted_function_name);
4947

0 commit comments

Comments
 (0)