]> git.sesse.net Git - vlc/commitdiff
Move vlc_atomic_t typedef to <vlc_common.h>
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 29 Jun 2010 14:25:37 +0000 (17:25 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 29 Jun 2010 14:29:01 +0000 (17:29 +0300)
Then we don't always need to include <vlc_atomic.h>

include/vlc_atomic.h
include/vlc_common.h

index 9370fbc899b4d36ea70678e2daab267079a9f50a..51acccc726e3306ea33dff71a008b1447bed6f2f 100644 (file)
  * Atomic operations do not require locking, but they are not very powerful.
  */
 
-/**
- * Memory storage space for an atom. Never access it directly.
- */
-typedef union
-{
-    volatile uintptr_t u;
-    volatile intptr_t  s;
-} vlc_atomic_t;
-
 /* All functions return the atom value _after_ the operation. */
 
 VLC_EXPORT(uintptr_t, vlc_atomic_get, (const vlc_atomic_t *));
index 5e48e418f1ebcaa1f5c9dfd57e7c4649bd503a0c..371b883e30abc18c8c82801e833e0990c959c285 100644 (file)
@@ -516,6 +516,15 @@ 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
  *****************************************************************************/
@@ -558,7 +567,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 # define VLC_OBJECT( x ) ((vlc_object_t *)(x))
 #endif
 
-#include <vlc_atomic.h>
 typedef struct gc_object_t
 {
     vlc_atomic_t    refs;