mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-01-10 19:08:39 +00:00
game working in debug but not in release
This commit is contained in:
parent
87f29a8310
commit
c132b425d2
|
|
@ -24,6 +24,16 @@ void atomic_set(volatile int64* value, int64 new_value)
|
|||
__atomic_store_n(value, new_value, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
inline
|
||||
int32 atomic_set_fetch(volatile int32* value, int32 new_value) {
|
||||
return __atomic_exchange_n(value, new_value, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
inline
|
||||
int64 atomic_set_fetch(volatile int64* value, int64 new_value) {
|
||||
return __atomic_exchange_n(value, new_value, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
inline
|
||||
void atomic_get(volatile byte* value, byte data[16])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#define TOS_PLATFORM_LINUX_THREADING_SPINLOCK_H
|
||||
|
||||
#include "../../../stdlib/Types.h"
|
||||
#include "Spinlock.h"
|
||||
|
||||
typedef volatile int32 spinlock32;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,18 @@ void atomic_set(volatile int64* value, int64 new_value)
|
|||
InterlockedExchange((long *) value, (long) new_value);
|
||||
}
|
||||
|
||||
inline
|
||||
int32 atomic_set_fetch(volatile int32* value, int32 new_value)
|
||||
{
|
||||
return (int32) InterlockedExchange((long *) value, new_value);
|
||||
}
|
||||
|
||||
inline
|
||||
int64 atomic_set_fetch(volatile int64* value, int64 new_value)
|
||||
{
|
||||
return (int64) InterlockedExchange((long *) value, (long) new_value);
|
||||
}
|
||||
|
||||
inline
|
||||
void atomic_set(volatile byte* value, const byte new_value[16])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include "../TimeUtils.h"
|
||||
#include "Spinlock.h"
|
||||
|
||||
inline
|
||||
void spinlock_start(spinlock32* lock, int32 delay = 10) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user