diff options
Diffstat (limited to 'libsanitizer/tsan/tsan_platform_mac.cc')
-rw-r--r-- | libsanitizer/tsan/tsan_platform_mac.cc | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/libsanitizer/tsan/tsan_platform_mac.cc b/libsanitizer/tsan/tsan_platform_mac.cc index 3dca611dc92..c3d4d905219 100644 --- a/libsanitizer/tsan/tsan_platform_mac.cc +++ b/libsanitizer/tsan/tsan_platform_mac.cc @@ -38,17 +38,18 @@ namespace __tsan { -ScopedInRtl::ScopedInRtl() { +uptr GetShadowMemoryConsumption() { + return 0; } -ScopedInRtl::~ScopedInRtl() { +void FlushShadowMemory() { } -uptr GetShadowMemoryConsumption() { - return 0; +void WriteMemoryProfile(char *buf, uptr buf_size) { } -void FlushShadowMemory() { +uptr GetRSS() { + return 0; } #ifndef TSAN_GO @@ -88,6 +89,20 @@ void FinalizePlatform() { fflush(0); } +#ifndef TSAN_GO +int call_pthread_cancel_with_cleanup(int(*fn)(void *c, void *m, + void *abstime), void *c, void *m, void *abstime, + void(*cleanup)(void *arg), void *arg) { + // pthread_cleanup_push/pop are hardcore macros mess. + // We can't intercept nor call them w/o including pthread.h. + int res; + pthread_cleanup_push(cleanup, arg); + res = fn(c, m, abstime); + pthread_cleanup_pop(0); + return res; +} +#endif + } // namespace __tsan #endif // SANITIZER_MAC |