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 5dbf8f3 commit 5fe29a8Copy full SHA for 5fe29a8
compiler-rt/lib/profile/InstrProfilingUtil.c
@@ -155,7 +155,8 @@ COMPILER_RT_VISIBILITY int lprofLockFd(int fd) {
155
}
156
157
return 0;
158
-#elif defined(COMPILER_RT_HAS_FLOCK)
+#elif defined(COMPILER_RT_HAS_FLOCK) || defined(_WIN32)
159
+ // Windows doesn't have flock but WindowsMMap.h provides a shim
160
flock(fd, LOCK_EX);
161
162
#else
@@ -182,7 +183,8 @@ COMPILER_RT_VISIBILITY int lprofUnlockFd(int fd) {
182
183
184
185
186
187
188
flock(fd, LOCK_UN);
189
190
0 commit comments