FFmpeg
|
atomic.h File Reference
#include "config.h"
Include dependency graph for atomic.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Functions | |
int | avpriv_atomic_int_get (volatile int *ptr) |
Load the current value stored in an atomic integer. More... | |
void | avpriv_atomic_int_set (volatile int *ptr, int val) |
Store a new value in an atomic integer. More... | |
int | avpriv_atomic_int_add_and_fetch (volatile int *ptr, int inc) |
Add a value to an atomic integer. More... | |
void * | avpriv_atomic_ptr_cas (void *volatile *ptr, void *oldval, void *newval) |
Atomic pointer compare and swap. More... | |
Function Documentation
int avpriv_atomic_int_add_and_fetch | ( | volatile int * | ptr, |
int | inc | ||
) |
Add a value to an atomic integer.
- Parameters
-
ptr atomic integer inc the value to add to the atomic integer (may be negative)
- Returns
- the new value of the atomic integer.
- Note
- This does NOT act as a memory barrier. This is primarily intended for reference counting.
Definition at line 84 of file atomic.c.
Referenced by avpriv_atomic_ptr_cas().
int avpriv_atomic_int_get | ( | volatile int * | ptr | ) |
Load the current value stored in an atomic integer.
- Parameters
-
ptr atomic integer
- Returns
- the current value of the atomic integer
- Note
- This acts as a memory barrier.
Definition at line 74 of file atomic.c.
Referenced by avpriv_atomic_ptr_cas().
void avpriv_atomic_int_set | ( | volatile int * | ptr, |
int | val | ||
) |
Store a new value in an atomic integer.
- Parameters
-
ptr atomic integer val the value to store in the atomic integer
- Note
- This acts as a memory barrier.
Definition at line 79 of file atomic.c.
Referenced by avpriv_atomic_ptr_cas().
Generated on Mon Nov 18 2024 06:52:04 for FFmpeg by 1.8.11