We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccee390 commit 62c7d84Copy full SHA for 62c7d84
compiler-rt/lib/profile/GCDAProfiling.c
@@ -67,12 +67,12 @@ typedef unsigned long long uint64_t;
67
68
#ifndef _WIN32
69
#include <pthread.h>
70
-pthread_mutex_t gcov_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t gcov_mutex = PTHREAD_MUTEX_INITIALIZER;
71
static __inline void gcov_lock() { pthread_mutex_lock(&gcov_mutex); }
72
static __inline void gcov_unlock() { pthread_mutex_unlock(&gcov_mutex); }
73
#else
74
#include <windows.h>
75
-SRWLOCK gcov_mutex = SRWLOCK_INIT;
+static SRWLOCK gcov_mutex = SRWLOCK_INIT;
76
static __inline void gcov_lock() { AcquireSRWLockExclusive(&gcov_mutex); }
77
static __inline void gcov_unlock() { ReleaseSRWLockExclusive(&gcov_mutex); }
78
#endif
0 commit comments