[vlc-commits] Move vlc_atomic_t to <vlc_atomic.h> and correct definition
Rémi Denis-Courmont
git at videolan.org
Sun May 13 19:28:07 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 13 20:06:57 2012 +0300| [5035a0281c0b1d82adda3b67cc4633de04616328] | committer: Rémi Denis-Courmont
Move vlc_atomic_t to <vlc_atomic.h> and correct definition
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5035a0281c0b1d82adda3b67cc4633de04616328
---
include/vlc_atomic.h | 8 ++++++++
include/vlc_common.h | 9 ---------
include/vlc_picture.h | 1 +
modules/gui/qt4/dialogs/messages.cpp | 1 -
modules/gui/qt4/dialogs/messages.hpp | 1 +
src/audio_output/aout_internal.h | 2 ++
6 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/include/vlc_atomic.h b/include/vlc_atomic.h
index 6a1f435..051e1ae 100644
--- a/include/vlc_atomic.h
+++ b/include/vlc_atomic.h
@@ -203,6 +203,14 @@ bool vlc_atomic_compare_exchange(volatile void *object, void *expected,
# endif
+/**
+ * Memory storage space for an atom. Never access it directly.
+ */
+typedef union
+{
+ atomic_uintptr_t u;
+} vlc_atomic_t;
+
/** Static initializer for \ref vlc_atomic_t */
# define VLC_ATOMIC_INIT(val) { (val) }
diff --git a/include/vlc_common.h b/include/vlc_common.h
index 8ed6883..c04d6f3 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -444,15 +444,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
#include "vlc_mtime.h"
#include "vlc_threads.h"
-/**
- * Memory storage space for an atom. Never access it directly.
- */
-typedef union
-{
- volatile uintptr_t u;
- volatile intptr_t s;
-} vlc_atomic_t;
-
/*****************************************************************************
* Common structure members
*****************************************************************************/
diff --git a/include/vlc_picture.h b/include/vlc_picture.h
index b58fbed..5c481f2 100644
--- a/include/vlc_picture.h
+++ b/include/vlc_picture.h
@@ -32,6 +32,7 @@
*/
#include <vlc_es.h>
+#include <vlc_atomic.h>
/** Description of a planar graphic field */
typedef struct plane_t
diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp
index c711ed0..c494ab2 100644
--- a/modules/gui/qt4/dialogs/messages.cpp
+++ b/modules/gui/qt4/dialogs/messages.cpp
@@ -25,7 +25,6 @@
#endif
#include "dialogs/messages.hpp"
-#include <vlc_atomic.h>
#include <QTextEdit>
#include <QTextCursor>
diff --git a/modules/gui/qt4/dialogs/messages.hpp b/modules/gui/qt4/dialogs/messages.hpp
index d8b1157..27abd2d 100644
--- a/modules/gui/qt4/dialogs/messages.hpp
+++ b/modules/gui/qt4/dialogs/messages.hpp
@@ -28,6 +28,7 @@
#include "util/singleton.hpp"
#include "ui/messages_panel.h"
#include <stdarg.h>
+#include <vlc_atomic.h>
class QTabWidget;
class QPushButton;
diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index e94c0c8..a5dd25b 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -24,6 +24,8 @@
#ifndef LIBVLC_AOUT_INTERNAL_H
# define LIBVLC_AOUT_INTERNAL_H 1
+# include <vlc_atomic.h>
+
/* Max input rate factor (1/4 -> 4) */
# define AOUT_MAX_INPUT_RATE (4)
More information about the vlc-commits
mailing list