NewMadeleine

Documentation

synchronization

nm_cond_* functions are used to manage synchronization with & without pioman. More...

Collaboration diagram for synchronization:
static void nm_cond_init (nm_cond_status_t *p_cond, nm_status_t bitmask)
 initialize a nm_cond_status_t object More...
 
static void nm_cond_destroy (nm_cond_status_t *p_cond)
 free resources associated with a nm_cond_status_t object More...
 
static nm_status_t nm_cond_test (const nm_cond_status_t *p_cond, nm_status_t bitmask)
 test whether the given bit is set in the status; unlocked, weak consistency More...
 
static nm_status_t nm_cond_test_locked (const nm_cond_status_t *p_cond, nm_status_t bitmask)
 test whether the given bit is set in the status; locked, guaranteed consistency, slower More...
 
static void nm_cond_add (nm_cond_status_t *p_cond, nm_status_t bitmask)
 add a bit to the bitmask in the status, do not unlock waiters (for bits that will not be waited for) More...
 
static void nm_cond_wait (nm_cond_status_t *p_cond, nm_status_t bitmask, nm_core_t p_core)
 wait for the given bit to be set in the status; do active polling while waiting More...
 
static void nm_cond_signal (nm_cond_status_t *p_cond, nm_status_t bitmask)
 add a bit and wake up threads waiting for it More...
 
static void nm_cond_wait_all (void **pp_conds, int n, uintptr_t offset, nm_status_t bitmask, nm_core_t p_core)
 wait on multiple statuses at the same time More...
 

Detailed Description

nm_cond_* functions are used to manage synchronization with & without pioman.

They are used internally for request status but may be used by endusers for synchronization with monitor handlers

Function Documentation

◆ nm_cond_add()

static void nm_cond_add ( nm_cond_status_t p_cond,
nm_status_t  bitmask 
)
inlinestatic

add a bit to the bitmask in the status, do not unlock waiters (for bits that will not be waited for)

Definition at line 661 of file nm_core_interface.h.

Referenced by nm_status_add().

Here is the caller graph for this function:

◆ nm_cond_destroy()

static void nm_cond_destroy ( nm_cond_status_t p_cond)
inlinestatic

free resources associated with a nm_cond_status_t object

Referenced by nm_status_destroy().

Here is the caller graph for this function:

◆ nm_cond_init()

static void nm_cond_init ( nm_cond_status_t p_cond,
nm_status_t  bitmask 
)
inlinestatic

initialize a nm_cond_status_t object

Examples
nm_bench_req_monitor.c.

Definition at line 642 of file nm_core_interface.h.

Referenced by nm_status_init().

Here is the caller graph for this function:

◆ nm_cond_signal()

static void nm_cond_signal ( nm_cond_status_t p_cond,
nm_status_t  bitmask 
)
inlinestatic

add a bit and wake up threads waiting for it

Examples
nm_bench_req_monitor.c.

Definition at line 671 of file nm_core_interface.h.

Referenced by nm_status_signal().

Here is the caller graph for this function:

◆ nm_cond_test()

static nm_status_t nm_cond_test ( const nm_cond_status_t p_cond,
nm_status_t  bitmask 
)
inlinestatic

test whether the given bit is set in the status; unlocked, weak consistency

Definition at line 651 of file nm_core_interface.h.

Referenced by nm_cond_test_locked(), nm_cond_wait(), and nm_status_test().

Here is the caller graph for this function:

◆ nm_cond_test_locked()

static nm_status_t nm_cond_test_locked ( const nm_cond_status_t p_cond,
nm_status_t  bitmask 
)
inlinestatic

test whether the given bit is set in the status; locked, guaranteed consistency, slower

Definition at line 656 of file nm_core_interface.h.

References nm_cond_test().

Referenced by nm_status_test().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nm_cond_wait()

static void nm_cond_wait ( nm_cond_status_t p_cond,
nm_status_t  bitmask,
nm_core_t  p_core 
)
inlinestatic

wait for the given bit to be set in the status; do active polling while waiting

Examples
nm_bench_req_monitor.c.

Definition at line 676 of file nm_core_interface.h.

References nm_cond_test(), and nm_schedule().

Referenced by nm_cond_wait_all(), and nm_status_wait().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nm_cond_wait_all()

static void nm_cond_wait_all ( void **  pp_conds,
int  n,
uintptr_t  offset,
nm_status_t  bitmask,
nm_core_t  p_core 
)
inlinestatic

wait on multiple statuses at the same time

Definition at line 684 of file nm_core_interface.h.

References nm_cond_wait().

Referenced by nm_status_wait_all().

Here is the call graph for this function:
Here is the caller graph for this function: