[compiler-rt] [TSAN] Add __tsan_check_no_mutexes_held helper (PR #69372)
    Dmitry Vyukov via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Oct 23 22:42:00 PDT 2023
    
    
  
================
@@ -126,6 +126,10 @@ void __tsan_mutex_post_signal(void *addr, unsigned flags);
 void __tsan_mutex_pre_divert(void *addr, unsigned flags);
 void __tsan_mutex_post_divert(void *addr, unsigned flags);
 
+// Annotate that no mutexes can be held. If we are holding mutexes, then
----------------
dvyukov wrote:
This is effectively not an annotation, but a check. So I would say something along the following lines:
```
// Check that the current thread does not hold any mutexes,
// report a bug report otherwise.
```
https://github.com/llvm/llvm-project/pull/69372
    
    
More information about the llvm-commits
mailing list