On 06/02/15 22:39, Carl Worth wrote:
On Fri, Feb 06 2015, Aaron Watry wrote:
Ignore me if this is a stupid question, but should those both be
sizeof(short)? I'd expect the first to be sizeof(char).
Not a stupid question. That was a copy-and-paste (kill-and-yank ?) bug
of mine.
Thanks for your attention to detail. I've fixed this in my tree.
-Carl
Hi Carl,
Just one more tweak to InterlockedExchangeAdd64 as per patch attached.
(The 64bit intrisicis are only available on 64-bits, but the
non-intrisinc version is available everywhee.)
With that u_test_atomic builds and passes for me both on 32 and 64bits.
Sorry for the delay. And thanks for your help in keeping MSVC support on
par.
Jose
diff --git a/src/util/u_atomic.h b/src/util/u_atomic.h
index 4eb0ec6..0c43410 100644
--- a/src/util/u_atomic.h
+++ b/src/util/u_atomic.h
@@ -147,10 +147,10 @@ char _InterlockedCompareExchange8(char volatile *Destination8, char Exchange8, c
(assert(!"should not get here"), 0))
#define p_atomic_add(_v, _i) (\
- sizeof *(_v) == sizeof(short) ? _InterlockedExchangeAdd8 ((char *) (_v), (_i)) : \
+ sizeof *(_v) == sizeof(char) ? _InterlockedExchangeAdd8 ((char *) (_v), (_i)) : \
sizeof *(_v) == sizeof(short) ? _InterlockedExchangeAdd16((short *) (_v), (_i)) : \
sizeof *(_v) == sizeof(long) ? _InterlockedExchangeAdd ((long *) (_v), (_i)) : \
- sizeof *(_v) == sizeof(__int64) ? _InterlockedExchangeAdd64((__int64 *)(_v), (_i)) : \
+ sizeof *(_v) == sizeof(__int64) ? InterlockedExchangeAdd64 ((__int64 *)(_v), (_i)) : \
(assert(!"should not get here"), 0))
#define p_atomic_cmpxchg(_v, _old, _new) (\
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev