From c52e96aa4127335ab05fc67c9988948669c0a158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> Date: Sun, 13 May 2012 19:56:35 +0300 Subject: [PATCH] input: convert item id to new atomic interface --- src/input/item.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/item.c b/src/input/item.c index 151e4519b05f..dff81bab1f00 100644 --- a/src/input/item.c +++ b/src/input/item.c @@ -804,7 +804,7 @@ input_item_NewWithType( const char *psz_uri, const char *psz_name, int i_options, const char *const *ppsz_options, unsigned flags, mtime_t duration, int type ) { - static vlc_atomic_t last_input_id = VLC_ATOMIC_INIT(0); + static atomic_int last_input_id = ATOMIC_VAR_INIT(0); input_item_owner_t *owner = calloc( 1, sizeof( *owner ) ); if( unlikely(owner == NULL) ) @@ -813,7 +813,7 @@ input_item_NewWithType( const char *psz_uri, const char *psz_name, input_item_t *p_input = &owner->item; vlc_event_manager_t * p_em = &p_input->event_manager; - p_input->i_id = vlc_atomic_inc(&last_input_id); + p_input->i_id = atomic_fetch_add(&last_input_id, 1); vlc_gc_init( p_input, input_item_Destroy ); vlc_mutex_init( &p_input->lock ); -- GitLab