From 6f9bf4ab7f99b89c6c2d6c977028b34f71095a18 Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Thu, 1 Jul 2010 20:32:44 +0200 Subject: [PATCH] Safer vlc_atomic_set for win32. --- src/win32/atomic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.39.2