Skip to content

Commit

Permalink
Fixes: windows x64 build
Browse files Browse the repository at this point in the history
MSVC complains:
error C4013: 'atomic_storeX' undefined; assuming extern returning int

atomic_storeX - is no longer defined. This patch adds back its implementation.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
aserdean committed Jan 10, 2018
1 parent c8b1ad4 commit b02d7d5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/ovs-atomic-msvc.h
Expand Up @@ -124,8 +124,13 @@ atomic_signal_fence(memory_order order)
}
#elif _M_X64
/* 64 bit writes are atomic on amd64 if 64 bit aligned. */
#define atomic_store64(DST, SRC, ORDER) \
atomic_storeX(64, DST, SRC, ORDER)
#define atomic_store64(DST, SRC, ORDER) \
if (ORDER == memory_order_seq_cst) { \
InterlockedExchange64((int64_t volatile *) (DST), \
(int64_t) (SRC)); \
} else { \
*(DST) = (SRC); \
}
#endif

#define atomic_store8(DST, SRC, ORDER) \
Expand Down

0 comments on commit b02d7d5

Please sign in to comment.