Commit a9daba19 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Move vlc_atomic_t typedef to <vlc_common.h>

Then we don't always need to include <vlc_atomic.h>
parent 85a9ea3b
...@@ -26,15 +26,6 @@ ...@@ -26,15 +26,6 @@
* Atomic operations do not require locking, but they are not very powerful. * 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. */ /* All functions return the atom value _after_ the operation. */
VLC_EXPORT(uintptr_t, vlc_atomic_get, (const vlc_atomic_t *)); VLC_EXPORT(uintptr_t, vlc_atomic_get, (const vlc_atomic_t *));
......
...@@ -516,6 +516,15 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ ...@@ -516,6 +516,15 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
#include "vlc_mtime.h" #include "vlc_mtime.h"
#include "vlc_threads.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 * Common structure members
*****************************************************************************/ *****************************************************************************/
...@@ -558,7 +567,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ ...@@ -558,7 +567,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
# define VLC_OBJECT( x ) ((vlc_object_t *)(x)) # define VLC_OBJECT( x ) ((vlc_object_t *)(x))
#endif #endif
#include <vlc_atomic.h>
typedef struct gc_object_t typedef struct gc_object_t
{ {
vlc_atomic_t refs; vlc_atomic_t refs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment