소스 검색

atomic: Solaris needs the `_nv` variant of `atomic_or_uint`.

(This means "new value" and returns the atomically updated value. Before, we
were returning a value from a void function.)
Ryan C. Gordon 1 년 전
부모
커밋
498cbffd89
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/atomic/SDL_atomic.c

+ 1 - 1
src/atomic/SDL_atomic.c

@@ -259,7 +259,7 @@ int SDL_AtomicGet(SDL_atomic_t *a)
 #elif defined(__MACOSX__)  /* this is deprecated in 10.12 sdk; favor gcc atomics. */
     return sizeof(a->value) == sizeof(uint32_t) ? OSAtomicOr32Barrier(0, (volatile uint32_t *)&a->value) : OSAtomicAdd64Barrier(0, (volatile int64_t *)&a->value);
 #elif defined(__SOLARIS__)
-    return atomic_or_uint((volatile uint_t *)&a->value, 0);
+    return atomic_or_uint_nv((volatile uint_t *)&a->value, 0);
 #else
     int value;
     do {