[PATCH] D75080: [profile] gcov_mutex must be static

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 01:57:08 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG62c7d8402651: [profile] gcov_mutex must be static (authored by Calixte Denizet <calixte.denizet at gmail.com>).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75080/new/

https://reviews.llvm.org/D75080

Files:
  compiler-rt/lib/profile/GCDAProfiling.c


Index: compiler-rt/lib/profile/GCDAProfiling.c
===================================================================
--- compiler-rt/lib/profile/GCDAProfiling.c
+++ compiler-rt/lib/profile/GCDAProfiling.c
@@ -67,12 +67,12 @@
 
 #ifndef _WIN32
 #include <pthread.h>
-pthread_mutex_t gcov_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t gcov_mutex = PTHREAD_MUTEX_INITIALIZER;
 static __inline void gcov_lock() { pthread_mutex_lock(&gcov_mutex); }
 static __inline void gcov_unlock() { pthread_mutex_unlock(&gcov_mutex); }
 #else
 #include <windows.h>
-SRWLOCK gcov_mutex = SRWLOCK_INIT;
+static SRWLOCK gcov_mutex = SRWLOCK_INIT;
 static __inline void gcov_lock() { AcquireSRWLockExclusive(&gcov_mutex); }
 static __inline void gcov_unlock() { ReleaseSRWLockExclusive(&gcov_mutex); }
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75080.246388.patch
Type: text/x-patch
Size: 800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200225/206f5320/attachment.bin>


More information about the llvm-commits mailing list