From: Laurent Aimar Date: Thu, 1 Jul 2010 18:32:44 +0000 (+0200) Subject: Safer vlc_atomic_set for win32. X-Git-Tag: 1.2.0-pre1~5986 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=6f9bf4ab7f99b89c6c2d6c977028b34f71095a18;p=vlc Safer vlc_atomic_set for win32. --- diff --git a/src/win32/atomic.c b/src/win32/atomic.c index 3110649470..abadf894ff 100644 --- a/src/win32/atomic.c +++ b/src/win32/atomic.c @@ -34,7 +34,11 @@ uintptr_t vlc_atomic_get (const vlc_atomic_t *atom) uintptr_t vlc_atomic_set (vlc_atomic_t *atom, uintptr_t v) { - atom->u = v; +#if defined (WIN64) + InterlockedExchange64 (&atom->u, v); +#else + InterlockedExchange (&atom->u, v); +#endif return v; }