gallium: draw_arrays/elements_instanced() are of type void.
[mesa.git] / src / gallium / include / pipe / p_atomic.h
index a963267e26430a51688b29cb6ff7d5fedae62f86..0c3fbae428c1984787415ce3cc1829a00d7be707 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
 #elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86))
 #define PIPE_ATOMIC_ASM_GCC_X86
 #elif defined(PIPE_CC_GCC)
-#define PIPE_ATOMIC_GCC_INTRINISIC              
+#define PIPE_ATOMIC_GCC_INTRINSIC
 #else
 #define PIPE_ATOMIC_MUTEX                       
 #endif
@@ -86,7 +86,7 @@ p_atomic_cmpxchg(struct pipe_atomic *v, int32_t old, int32_t _new)
 
 /* Implementation using GCC-provided synchronization intrinsics
  */
-#if defined(PIPE_ATOMIC_ASM_GCC_INTRINSIC)
+#if defined(PIPE_ATOMIC_GCC_INTRINSIC)
 
 #define PIPE_ATOMIC "GCC Sync Intrinsics"
 
@@ -225,7 +225,7 @@ p_atomic_cmpxchg(struct pipe_atomic *v, int32_t old, int32_t _new)
 
 struct pipe_atomic
 {
-   long count;
+   volatile long count;
 };
 
 #define p_atomic_set(_v, _i) ((_v)->count = (_i))
@@ -234,7 +234,7 @@ struct pipe_atomic
 static INLINE boolean
 p_atomic_dec_zero(struct pipe_atomic *v)
 {
-   return InterlockedDecrement(&v->count) != 0;
+   return InterlockedDecrement(&v->count) == 0;
 }
 
 static INLINE void
@@ -270,7 +270,6 @@ p_atomic_cmpxchg(struct pipe_atomic *v, int32_t old, int32_t _new)
  * Add an assembly port instead. It may abort and
  * doesn't destroy used mutexes.
  */
-#warning "using mutex-based fallback for pipe_atomic"
 
 struct pipe_atomic {
    pipe_mutex mutex;