NewMadeleine

Documentation

« back to PM2 home.
Front-end for atomic ops

Use atomic instructions only in multi-threaded mode. More...

Functions

static void nm_mem_fence_always (void)
 memory fence, always
 
static void nm_mem_fence (void)
 memory fence only when multithread
 
static int nm_atomic_inc (int *v)
 increment int, atomic only when multithread
 
static int nm_atomic_alway_inc (int *v)
 increment int, always atomic
 
static int nm_atomic_dec (int *v)
 decrement int, atomic only when multithread
 
static int nm_atomic_always_dec (int *v)
 decrement int, always atomic
 
static void nm_atomic_add (int *v, int v2)
 int add, atomic only when multithread
 
static void nm_atomic_always_add (int *v, int v2)
 int add, always atomic
 
static int nm_atomic_compare_and_swap (int *v, int oldval, int newval)
 boolean int compare and swap, atomic only when multithread
 
static int nm_atomic_always_compare_and_swap (int *v, int oldval, int newval)
 boolean int compare and swap, always atomic
 

Detailed Description

Use atomic instructions only in multi-threaded mode.

Function Documentation

◆ nm_atomic_add()

static void nm_atomic_add ( int *  v,
int  v2 
)
inlinestatic

int add, atomic only when multithread

Definition at line 933 of file nm_core_interface.h.

References nm_core_get_thread_level(), and NM_THREAD_SERIALIZED.

Here is the call graph for this function:

◆ nm_atomic_alway_inc()

static int nm_atomic_alway_inc ( int *  v)
inlinestatic

increment int, always atomic

Definition at line 903 of file nm_core_interface.h.

◆ nm_atomic_always_add()

static void nm_atomic_always_add ( int *  v,
int  v2 
)
inlinestatic

int add, always atomic

Definition at line 951 of file nm_core_interface.h.

◆ nm_atomic_always_compare_and_swap()

static int nm_atomic_always_compare_and_swap ( int *  v,
int  oldval,
int  newval 
)
inlinestatic

boolean int compare and swap, always atomic

Definition at line 983 of file nm_core_interface.h.

◆ nm_atomic_always_dec()

static int nm_atomic_always_dec ( int *  v)
inlinestatic

decrement int, always atomic

Definition at line 927 of file nm_core_interface.h.

◆ nm_atomic_compare_and_swap()

static int nm_atomic_compare_and_swap ( int *  v,
int  oldval,
int  newval 
)
inlinestatic

boolean int compare and swap, atomic only when multithread

Definition at line 957 of file nm_core_interface.h.

References nm_core_get_thread_level(), and NM_THREAD_SERIALIZED.

Here is the call graph for this function:

◆ nm_atomic_dec()

static int nm_atomic_dec ( int *  v)
inlinestatic

decrement int, atomic only when multithread

Definition at line 909 of file nm_core_interface.h.

References nm_core_get_thread_level(), and NM_THREAD_SERIALIZED.

Referenced by nm_refcount_dec().

Here is the call graph for this function:

◆ nm_atomic_inc()

static int nm_atomic_inc ( int *  v)
inlinestatic

increment int, atomic only when multithread

Definition at line 885 of file nm_core_interface.h.

References nm_core_get_thread_level(), and NM_THREAD_SERIALIZED.

Referenced by nm_coll_tree_issend(), nm_coll_tree_recv(), nm_coll_tree_send(), and nm_refcount_inc_internal().

Here is the call graph for this function:

◆ nm_mem_fence()

static void nm_mem_fence ( void  )
inlinestatic

memory fence only when multithread

Definition at line 871 of file nm_core_interface.h.

References nm_core_get_thread_level(), and NM_THREAD_SERIALIZED.

Here is the call graph for this function:

◆ nm_mem_fence_always()

static void nm_mem_fence_always ( void  )
inlinestatic

memory fence, always

Definition at line 865 of file nm_core_interface.h.