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.
flock
1 parent 6c4267f commit 7a90ff7Copy full SHA for 7a90ff7
compiler-rt/lib/profile/InstrProfilingUtil.c
@@ -152,7 +152,8 @@ COMPILER_RT_VISIBILITY int lprofLockFd(int fd) {
152
}
153
154
return 0;
155
-#elif defined(COMPILER_RT_HAS_FLOCK)
+#elif defined(COMPILER_RT_HAS_FLOCK) || defined(_WIN32)
156
+ // Windows doesn't have flock but WindowsMMap.h provides a shim
157
flock(fd, LOCK_EX);
158
159
#else
@@ -179,7 +180,8 @@ COMPILER_RT_VISIBILITY int lprofUnlockFd(int fd) {
179
180
181
182
183
184
185
flock(fd, LOCK_UN);
186
187
0 commit comments