Skip to content

Commit 91064e0

Browse files
committed
xrCore: add Linux implementation InterlockedExchange to ppmd_compressor
1 parent 58d586b commit 91064e0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/xrCore/ppmd_compressor.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
#include "stdafx.h"
22
#include "ppmd_compressor.h"
3-
#include "ppmd.h"
3+
#include "PPMd.h"
4+
5+
#if defined(LINUX)
6+
7+
LONG InterlockedExchange(LONG volatile *dest, LONG val)
8+
{
9+
LONG ret;
10+
__asm__ __volatile__( "lock; xchg %0,(%1)" : "=r" (ret) :"r" (dest), "0" (val) : "memory" );
11+
return ret;
12+
}
13+
#endif
414

515
const u32 suballocator_size = 32;
616
const u32 order_model = 8;

0 commit comments

Comments
 (0)