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

Move vlc_atomic_t to <vlc_atomic.h> and correct definition

parent e245cb85
...@@ -203,6 +203,14 @@ bool vlc_atomic_compare_exchange(volatile void *object, void *expected, ...@@ -203,6 +203,14 @@ bool vlc_atomic_compare_exchange(volatile void *object, void *expected,
# endif # 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 */ /** Static initializer for \ref vlc_atomic_t */
# define VLC_ATOMIC_INIT(val) { (val) } # define VLC_ATOMIC_INIT(val) { (val) }
......
...@@ -444,15 +444,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ ...@@ -444,15 +444,6 @@ 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
*****************************************************************************/ *****************************************************************************/
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
*/ */
#include <vlc_es.h> #include <vlc_es.h>
#include <vlc_atomic.h>
/** Description of a planar graphic field */ /** Description of a planar graphic field */
typedef struct plane_t typedef struct plane_t
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#endif #endif
#include "dialogs/messages.hpp" #include "dialogs/messages.hpp"
#include <vlc_atomic.h>
#include <QTextEdit> #include <QTextEdit>
#include <QTextCursor> #include <QTextCursor>
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "util/singleton.hpp" #include "util/singleton.hpp"
#include "ui/messages_panel.h" #include "ui/messages_panel.h"
#include <stdarg.h> #include <stdarg.h>
#include <vlc_atomic.h>
class QTabWidget; class QTabWidget;
class QPushButton; class QPushButton;
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#ifndef LIBVLC_AOUT_INTERNAL_H #ifndef LIBVLC_AOUT_INTERNAL_H
# define LIBVLC_AOUT_INTERNAL_H 1 # define LIBVLC_AOUT_INTERNAL_H 1
# include <vlc_atomic.h>
/* Max input rate factor (1/4 -> 4) */ /* Max input rate factor (1/4 -> 4) */
# define AOUT_MAX_INPUT_RATE (4) # define AOUT_MAX_INPUT_RATE (4)
......
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