Skip to content

Commit 846fed7

Browse files
committed
Fix build failure on Windows
1 parent 790ce3f commit 846fed7

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

third-party/mimalloc/ide/vs2022/mimalloc-lib.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
<WholeProgramOptimization>false</WholeProgramOptimization>
309309
<BufferSecurityCheck>false</BufferSecurityCheck>
310310
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
311-
<CompileAs>CompileAsCpp</CompileAs>
311+
<CompileAs>CompileAsC</CompileAs>
312312
<IntrinsicFunctions>true</IntrinsicFunctions>
313313
<LanguageStandard>stdcpp20</LanguageStandard>
314314
</ClCompile>
@@ -497,4 +497,4 @@
497497
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
498498
<ImportGroup Label="ExtensionTargets">
499499
</ImportGroup>
500-
</Project>
500+
</Project>

third-party/mimalloc/include/mimalloc/atomic.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,14 @@ static inline int64_t mi_atomic_addi64_relaxed(volatile _Atomic(int64_t)*p, int6
266266
return current;
267267
#endif
268268
}
269+
270+
static inline void mi_atomic_void_addi64_relaxed(volatile int64_t* p, const volatile int64_t* padd) {
271+
const int64_t add = *padd;
272+
if (add != 0) {
273+
mi_atomic_addi64_relaxed((volatile _Atomic(int64_t)*)p, add);
274+
}
275+
}
276+
269277
static inline void mi_atomic_maxi64_relaxed(volatile _Atomic(int64_t)*p, int64_t x) {
270278
int64_t current;
271279
do {

0 commit comments

Comments
 (0)