NewMadeleine

Documentation

« back to PM2 home.
Front-end to deal with status in requests

Functions

static void nm_status_init (struct nm_req_s *p_req, nm_status_t bitmask)
 initialize cond status with given initial value
 
static void nm_status_destroy (struct nm_req_s *p_req)
 
static nm_status_t nm_status_test (const struct nm_req_s *p_req, nm_status_t bitmask)
 query for given bits in req status; returns matched bits
 
static void nm_status_add (struct nm_req_s *p_req, nm_status_t bitmask)
 add a bit to the status of the request; does not unlock others (no signal)
 
static void nm_status_unset (struct nm_req_s *p_req, nm_status_t bitmask)
 remove bits of bitmask from req status
 
static void nm_status_wait (struct nm_req_s *p_req, nm_status_t bitmask, nm_core_t p_core)
 wait for any bit matching in req status
 
static void nm_status_signal (struct nm_req_s *p_req, nm_status_t bitmask)
 add the bits from bitmak to the status and wakes-up all others waiting on nm_status_wait().
 
static void nm_status_wait_all (void **pp_reqs, int n, uintptr_t offset, nm_status_t bitmask, nm_core_t p_core)
 wait for all reqs, any bit in bitmask
 
static void nm_status_assert (struct nm_req_s *p_req __attribute__((unused)), nm_status_t value __attribute__((unused)))
 
static void nm_status_spinwait (struct nm_req_s *p_req, nm_status_t status)
 
static int nm_status_test_allbits (struct nm_req_s *p_req, nm_status_t bitmask)
 tests for all given bits in status
 

Detailed Description

Function Documentation

◆ nm_status_add()

static void nm_status_add ( struct nm_req_s p_req,
nm_status_t  bitmask 
)
inlinestatic

add a bit to the status of the request; does not unlock others (no signal)

Definition at line 804 of file nm_core_interface.h.

References nm_cond_add(), and nm_req_s::status.

Here is the call graph for this function:

◆ nm_status_assert()

static void nm_status_assert ( struct nm_req_s *p_req   __attribute__(unused),
nm_status_t value   __attribute__(unused) 
)
inlinestatic

Definition at line 835 of file nm_core_interface.h.

References assert(), NM_STATUS_MASK_FULL, and nm_status_test().

Here is the call graph for this function:

◆ nm_status_destroy()

static void nm_status_destroy ( struct nm_req_s p_req)
inlinestatic

Definition at line 791 of file nm_core_interface.h.

References nm_cond_destroy(), and nm_req_s::status.

Here is the call graph for this function:

◆ nm_status_init()

static void nm_status_init ( struct nm_req_s p_req,
nm_status_t  bitmask 
)
inlinestatic

initialize cond status with given initial value

Definition at line 787 of file nm_core_interface.h.

References nm_cond_init(), and nm_req_s::status.

Here is the call graph for this function:

◆ nm_status_signal()

static void nm_status_signal ( struct nm_req_s p_req,
nm_status_t  bitmask 
)
inlinestatic

add the bits from bitmak to the status and wakes-up all others waiting on nm_status_wait().

Note
to honor monitors and not sawing off the branch we are sitting on for NM_STATUS_FINALIZED, it must be preferred to use nm_core_status_event() instead.

Definition at line 823 of file nm_core_interface.h.

References nm_cond_signal(), and nm_req_s::status.

Here is the call graph for this function:

◆ nm_status_spinwait()

static void nm_status_spinwait ( struct nm_req_s p_req,
nm_status_t  status 
)
inlinestatic

Definition at line 840 of file nm_core_interface.h.

References nm_status_test(), and status.

Here is the call graph for this function:

◆ nm_status_test()

static nm_status_t nm_status_test ( const struct nm_req_s p_req,
nm_status_t  bitmask 
)
inlinestatic

query for given bits in req status; returns matched bits

Definition at line 796 of file nm_core_interface.h.

References nm_cond_test(), nm_cond_test_locked(), NM_STATUS_FINALIZED, and nm_req_s::status.

Referenced by nm_sr_recv_data_size_wait(), nm_sr_recv_data_test(), nm_sr_recv_data_wait(), nm_sr_request_get_expected_size(), nm_status_assert(), nm_status_spinwait(), nm_status_test_allbits(), and nm_status_wait().

Here is the call graph for this function:

◆ nm_status_test_allbits()

static int nm_status_test_allbits ( struct nm_req_s p_req,
nm_status_t  bitmask 
)
inlinestatic

tests for all given bits in status

Definition at line 846 of file nm_core_interface.h.

References nm_status_test().

Referenced by nm_sr_request_test().

Here is the call graph for this function:

◆ nm_status_unset()

static void nm_status_unset ( struct nm_req_s p_req,
nm_status_t  bitmask 
)
inlinestatic

remove bits of bitmask from req status

Definition at line 809 of file nm_core_interface.h.

References nm_cond_mask(), and nm_req_s::status.

Here is the call graph for this function:

◆ nm_status_wait()

static void nm_status_wait ( struct nm_req_s p_req,
nm_status_t  bitmask,
nm_core_t  p_core 
)
inlinestatic

wait for any bit matching in req status

Definition at line 814 of file nm_core_interface.h.

References assert(), nm_cond_wait(), nm_status_test(), and nm_req_s::status.

Referenced by nm_sr_recv_data_size_wait(), nm_sr_recv_data_wait(), and nm_sr_rwait_data().

Here is the call graph for this function:

◆ nm_status_wait_all()

static void nm_status_wait_all ( void **  pp_reqs,
int  n,
uintptr_t  offset,
nm_status_t  bitmask,
nm_core_t  p_core 
)
inlinestatic

wait for all reqs, any bit in bitmask

Definition at line 828 of file nm_core_interface.h.

References nm_cond_wait_all(), nm_req_s::offset, and nm_req_s::status.

Referenced by nm_sr_request_wait_all().

Here is the call graph for this function: