[vlc-commits] commit: Safer vlc_atomic_set for win32. (Laurent Aimar )
git at videolan.org
git at videolan.org
Thu Jul 1 20:33:23 CEST 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Jul 1 20:32:44 2010 +0200| [6f9bf4ab7f99b89c6c2d6c977028b34f71095a18] | committer: Laurent Aimar
Safer vlc_atomic_set for win32.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6f9bf4ab7f99b89c6c2d6c977028b34f71095a18
---
src/win32/atomic.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/win32/atomic.c b/src/win32/atomic.c
index 3110649..abadf89 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;
}
More information about the vlc-commits
mailing list