Skip to content

Commit

Permalink
xrCore: add Linux implementation InterlockedExchange to ppmd_compressor
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed May 24, 2018
1 parent 58d586b commit 91064e0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/xrCore/ppmd_compressor.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#include "stdafx.h"
#include "ppmd_compressor.h"
#include "ppmd.h"
#include "PPMd.h"

#if defined(LINUX)

LONG InterlockedExchange(LONG volatile *dest, LONG val)
{
LONG ret;
__asm__ __volatile__( "lock; xchg %0,(%1)" : "=r" (ret) :"r" (dest), "0" (val) : "memory" );
return ret;
}
#endif

const u32 suballocator_size = 32;
const u32 order_model = 8;
Expand Down

0 comments on commit 91064e0

Please sign in to comment.