File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 5
5
#include <stdlib.h>
6
6
#include <string.h>
7
7
#include <time.h>
8
+ #include <threads.h>
8
9
9
10
#if defined(_MSC_VER ) || defined(__MINGW32__ )
10
11
#include <malloc.h> // using malloc.h with MSC/MINGW
@@ -48,15 +49,15 @@ typedef HANDLE pthread_t;
48
49
typedef int thread_ret_t ;
49
50
50
51
static void atomic_store (atomic_int * ptr , LONG val ) {
51
- Intechan_lockedExchange (ptr , val );
52
+ InterlockedExchange (ptr , val );
52
53
}
53
54
54
55
static LONG atomic_load (atomic_int * ptr ) {
55
- return Intechan_lockedCompareExchange (ptr , 0 , 0 );
56
+ return InterlockedCompareExchange (ptr , 0 , 0 );
56
57
}
57
58
58
59
static LONG atomic_fetch_add (atomic_int * ptr , LONG inc ) {
59
- return Intechan_lockedExchangeAdd (ptr , inc );
60
+ return InterlockedExchangeAdd (ptr , inc );
60
61
}
61
62
62
63
static LONG atomic_fetch_sub (atomic_int * ptr , LONG dec ) {
You can’t perform that action at this time.
0 commit comments