From 317fdb2ff02c98d88a3950791e938b1db3cca1cd Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Wed, 8 Dec 2021 16:30:46 -0500 Subject: Fixes compiling on windows 32-bit (#1549) * use correct LONG type for nni_atomic_flag on win32 * use InterlockExchangeAdd for nni_atomic_get_bool - this is equivelent to InterlockAdd for the purposes of this call (since it is adding 0) - this allows the code to compile on 32bit windows --- src/platform/windows/win_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/platform/windows/win_impl.h') diff --git a/src/platform/windows/win_impl.h b/src/platform/windows/win_impl.h index bbd007d0..c5be56fa 100644 --- a/src/platform/windows/win_impl.h +++ b/src/platform/windows/win_impl.h @@ -56,7 +56,7 @@ struct nni_plat_cv { #define NNI_CV_INITIALIZER(mxp) { .srl = mxp, .cv = CONDITION_VARIABLE_INIT } struct nni_atomic_flag { - unsigned f; + LONG f; }; struct nni_atomic_bool { -- cgit v1.2.3-70-g09d2