On Mon, Mar 28, 2016 at 09:11:24PM +0000, Sorin Vinturis wrote: > Hi Guru, > > I have verified the ovs-atomic-msvc.h header and all the defined > macros and functions have 32-bit and 64-bit correspondent. All 64-bit > macros use InterlockedXXX functions that are atomic: > InterlockedExchangeNoFence64, InterlockedExchange64, > InterlockedCompareExchange64, _InterlockedExchangeAdd64, > InterlockedAnd64, InterlockedOr64, InterlockedXor64. I have ran > test-atomic.c unit tests, on both 32-bit and 64-bit platforms, and all > the tests are verified. > > I also tested the 64-bit build on Hyper-V and it is stable. > > Is there a reason why we should not use ovs-atomic-msvc APIs for 64-bit > builds?
ovs-atomic-msvc.h seems pretty oriented toward a 32-bit build. At least, I really doubt MSVC would break 64-bit reads and writes into two 32-bit reads and writes on 64-bit builds, which is what the code in the header currently assumes. You don't want to update it to handle 64-bit builds differently? I guess that these would be optimizations, but they seem straightforward. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev