VLC  4.0.0-dev
Data Structures | Typedefs | Functions
vlc_atomic.h File Reference
Include dependency graph for vlc_atomic.h:

Go to the source code of this file.

Data Structures

struct  vlc_atomic_rc_t


typedef struct vlc_atomic_rc_t vlc_atomic_rc_t


static void vlc_atomic_rc_init (vlc_atomic_rc_t *rc)
 Init the RC to 1. More...
static void vlc_atomic_rc_inc (vlc_atomic_rc_t *rc)
 Increment the RC. More...
static bool vlc_atomic_rc_dec (vlc_atomic_rc_t *rc)
 Decrement the RC and return true if it reaches 0. More...
static uintptr_t vlc_atomic_rc_get (const vlc_atomic_rc_t *rc)
 Returns the current reference count. More...

Detailed Description

Atomic operations do not require locking, but they are not very powerful.

Typedef Documentation

◆ vlc_atomic_rc_t

Function Documentation

◆ vlc_atomic_rc_dec()

static bool vlc_atomic_rc_dec ( vlc_atomic_rc_t rc)

◆ vlc_atomic_rc_get()

static uintptr_t vlc_atomic_rc_get ( const vlc_atomic_rc_t rc)

Returns the current reference count.

This is not safe to use for logic and must only be used for debugging or assertion purposes

References vlc_atomic_rc_t::refs.

Referenced by picture_Destroy(), picture_pool_Cancel(), picture_pool_Get(), and picture_pool_Wait().

◆ vlc_atomic_rc_inc()

static void vlc_atomic_rc_inc ( vlc_atomic_rc_t rc)

◆ vlc_atomic_rc_init()

static void vlc_atomic_rc_init ( vlc_atomic_rc_t rc)