@@ -72,29 +72,29 @@ void utils_atomic_load_acquire_u64(uint64_t *ptr, uint64_t *out) {
7272 // NOTE: Windows cl complains about direct accessing 'ptr' which is next
7373 // accessed using Interlocked* functions (warning 28112 - disabled)
7474 ASSERT_IS_ALIGNED ((uintptr_t )ptr , 8 );
75- utils_annotate_acquire (ptr );
7675 LONG64 ret = InterlockedCompareExchange64 ((LONG64 volatile * )ptr , 0 , 0 );
76+ utils_annotate_acquire (ptr );
7777 * out = * (uint64_t * )& ret ;
7878}
7979
8080void utils_atomic_load_acquire_ptr (void * * ptr , void * * out ) {
8181 ASSERT_IS_ALIGNED ((uintptr_t )ptr , 8 );
82- utils_annotate_acquire ((void * )ptr );
8382 uintptr_t ret = (uintptr_t )InterlockedCompareExchangePointer (ptr , 0 , 0 );
83+ utils_annotate_acquire ((void * )ptr );
8484 * (uintptr_t * )out = ret ;
8585}
8686
8787void utils_atomic_store_release_u64 (uint64_t * ptr , uint64_t * val ) {
8888 ASSERT_IS_ALIGNED ((uintptr_t )ptr , 8 );
8989 ASSERT_IS_ALIGNED ((uintptr_t )val , 8 );
90- InterlockedExchange64 ((LONG64 volatile * )ptr , * (LONG64 * )val );
9190 utils_annotate_release (ptr );
91+ InterlockedExchange64 ((LONG64 volatile * )ptr , * (LONG64 * )val );
9292}
9393
9494void utils_atomic_store_release_ptr (void * * ptr , void * val ) {
9595 ASSERT_IS_ALIGNED ((uintptr_t )ptr , 8 );
96- InterlockedExchangePointer (ptr , val );
9796 utils_annotate_release (ptr );
97+ InterlockedExchangePointer (ptr , val );
9898}
9999
100100uint64_t utils_atomic_increment_u64 (uint64_t * ptr ) {
0 commit comments