Private definitions for nmad core. More...
Go to the source code of this file.
Data Structures | |
struct | nm_lazy_initializer_s |
struct | nm_core_dispatching_event_s |
an event ready for dispatch (matching already done) More... | |
struct | nm_in_chunk_s |
an incoming chunk of data More... | |
struct | nm_chunk_injector_s |
a chunk to be injected into nmad core More... | |
struct | nm_unexpected_s |
a chunk of unexpected message to be stored More... | |
Macros | |
#define | NM_ALIGN_FRONTIER sizeof(NM_ALIGN_TYPE) |
#define | nm_aligned(x) nm_aligned_n((x), NM_ALIGN_FRONTIER) |
#define | nm_offset_of(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) |
#define | nm_container_of(ptr, type, member) |
#define | NM_IS_THREADED ((nm_core_get_thread_level(nm_core_get_singleton()) >= NM_THREAD_SERIALIZED) ? 1 : 0) |
#define | NM_ALLOCATOR_TYPE(ENAME, TYPE) PUK_ALLOCATOR_TYPE_EXT(ENAME, TYPE, !NM_IS_THREADED) |
#define | NM_TRK_SMALL ((nm_trk_id_t)0) |
#define | NM_TRK_LARGE ((nm_trk_id_t)1) |
#define | NM_TRK_NONE ((nm_trk_id_t)-1) |
#define | NM_MAX_TRACKS 2 |
#define | NM_SEQ_FIRST ((nm_seq_t)1) |
First sequence number. More... | |
#define | nm_profile_add(COUNTER, VALUE) do {} while(0) |
#define | nm_profile_inc(COUNTER) nm_profile_add(COUNTER, 1) |
#define | NM_LAZY_INITIALIZER_INIT { .init_done = 0, .initializing = 0 } |
#define | NM_LAZY_INITIALIZER(ENAME, CTOR, DTOR) |
factorize process for lazy initialization. More... | |
Functions | |
static nm_len_t | nm_aligned_n (nm_len_t v, nm_len_t a) |
PUK_LIST_CREATE_FUNCS (nm_req) | |
PUK_LIST_CREATE_FUNCS (nm_req_chunk) | |
PUK_LFQUEUE_TYPE (nm_req_chunk, struct nm_req_chunk_s *, NULL, NM_REQ_CHUNK_QUEUE_SIZE) | |
PUK_ALLOCATOR_TYPE_EXT (nm_req_chunk, struct nm_req_chunk_s, !((nm_core_get_thread_level(nm_core_get_singleton()) >=NM_THREAD_SERIALIZED) ? 1 :0)) | |
allocator for request chunks More... | |
PUK_LFQUEUE_TYPE (nm_pkt_wrap, struct nm_pkt_wrap_s *, NULL, 512) | |
LF queue type for completed pw. More... | |
static nm_seq_t | nm_seq_next (nm_seq_t seq) |
Compute next sequence number. More... | |
static int | nm_seq_compare (nm_seq_t current, nm_seq_t seq1, nm_seq_t seq2) |
compare to seq numbers, assuming they are in the future returns -1 if seq1 is before seq2, 0 if equal, 1 if seq1 after seq2 More... | |
static int | nm_seq_fuzzy_compare (nm_seq_t seq1, nm_seq_t seq2) |
compare to seq numbers taking into account looping at overflow, assuming they are less than halftrip of overflow returns -1 if seq1 < seq2, 0 if equal, 1 if seq1 > seq2 More... | |
PUK_VECT_TYPE (nm_core_monitor, struct nm_core_monitor_s *) | |
PUK_LIST_TYPE (nm_core_pending_event, struct nm_core_event_s event;struct nm_core_monitor_s *p_core_monitor;) | |
a pending event, not dispatched immediately because it was received out of order More... | |
PUK_LFQUEUE_TYPE (nm_core_dispatching_event, struct nm_core_dispatching_event_s *, NULL, 1024) | |
PUK_ALLOCATOR_TYPE_EXT (nm_core_dispatching_event, struct nm_core_dispatching_event_s, !((nm_core_get_thread_level(nm_core_get_singleton()) >=NM_THREAD_SERIALIZED) ? 1 :0)) | |
PUK_LIST_DECLARE_TYPE2 (nm_unexpected_wildcard, struct nm_unexpected_s) | |
PUK_LIST_DECLARE_TYPE2 (nm_unexpected_gtag, struct nm_unexpected_s) | |
PUK_LIST_DECLARE_TYPE2 (nm_unexpected_gate, struct nm_unexpected_s) | |
PUK_LIST_DECLARE_TYPE2 (nm_unexpected_tag, struct nm_unexpected_s) | |
PUK_LIST_CREATE_FUNCS (nm_unexpected_wildcard) | |
PUK_LIST_CREATE_FUNCS (nm_unexpected_gtag) | |
PUK_LIST_CREATE_FUNCS (nm_unexpected_gate) | |
PUK_LIST_CREATE_FUNCS (nm_unexpected_tag) | |
Private definitions for nmad core.
This file is not installed and not part of the public API.
Definition in file nm_core_private.h.
#define NM_ALIGN_FRONTIER sizeof(NM_ALIGN_TYPE) |
Definition at line 27 of file nm_core_private.h.
#define nm_aligned | ( | x | ) | nm_aligned_n((x), NM_ALIGN_FRONTIER) |
Definition at line 28 of file nm_core_private.h.
#define NM_ALLOCATOR_TYPE | ( | ENAME, | |
TYPE | |||
) | PUK_ALLOCATOR_TYPE_EXT(ENAME, TYPE, !NM_IS_THREADED) |
Definition at line 51 of file nm_core_private.h.
#define nm_container_of | ( | ptr, | |
type, | |||
member | |||
) |
Definition at line 37 of file nm_core_private.h.
#define NM_IS_THREADED ((nm_core_get_thread_level(nm_core_get_singleton()) >= NM_THREAD_SERIALIZED) ? 1 : 0) |
Definition at line 46 of file nm_core_private.h.
#define NM_LAZY_INITIALIZER | ( | ENAME, | |
CTOR, | |||
DTOR | |||
) |
factorize process for lazy initialization.
Definition at line 157 of file nm_core_private.h.
#define NM_LAZY_INITIALIZER_INIT { .init_done = 0, .initializing = 0 } |
Definition at line 150 of file nm_core_private.h.
#define NM_MAX_TRACKS 2 |
Definition at line 77 of file nm_core_private.h.
#define nm_offset_of | ( | TYPE, | |
MEMBER | |||
) | ((size_t) &((TYPE *)0)->MEMBER) |
Definition at line 36 of file nm_core_private.h.
#define nm_profile_add | ( | COUNTER, | |
VALUE | |||
) | do {} while(0) |
Definition at line 137 of file nm_core_private.h.
#define nm_profile_inc | ( | COUNTER | ) | nm_profile_add(COUNTER, 1) |
Definition at line 140 of file nm_core_private.h.
#define NM_SEQ_FIRST ((nm_seq_t)1) |
First sequence number.
Definition at line 82 of file nm_core_private.h.
#define NM_TRK_LARGE ((nm_trk_id_t)1) |
Definition at line 73 of file nm_core_private.h.
#define NM_TRK_NONE ((nm_trk_id_t)-1) |
Definition at line 74 of file nm_core_private.h.
#define NM_TRK_SMALL ((nm_trk_id_t)0) |
Definition at line 72 of file nm_core_private.h.
Definition at line 30 of file nm_core_private.h.
compare to seq numbers, assuming they are in the future returns -1 if seq1 is before seq2, 0 if equal, 1 if seq1 after seq2
Definition at line 96 of file nm_core_private.h.
compare to seq numbers taking into account looping at overflow, assuming they are less than halftrip of overflow returns -1 if seq1 < seq2, 0 if equal, 1 if seq1 > seq2
Definition at line 113 of file nm_core_private.h.
References NM_FATAL, and NM_SEQ_MAX.
Compute next sequence number.
Definition at line 85 of file nm_core_private.h.
References NM_SEQ_NONE, and seq.
PUK_ALLOCATOR_TYPE_EXT | ( | nm_core_dispatching_event | , |
struct nm_core_dispatching_event_s | , | ||
! | (nm_core_get_thread_level(nm_core_get_singleton()) >=NM_THREAD_SERIALIZED) ? 1 :0 | ||
) |
PUK_ALLOCATOR_TYPE_EXT | ( | nm_req_chunk | , |
struct nm_req_chunk_s | , | ||
! | (nm_core_get_thread_level(nm_core_get_singleton()) >=NM_THREAD_SERIALIZED) ? 1 :0 | ||
) |
allocator for request chunks
PUK_LFQUEUE_TYPE | ( | nm_core_dispatching_event | , |
struct nm_core_dispatching_event_s * | , | ||
NULL | , | ||
1024 | |||
) |
PUK_LFQUEUE_TYPE | ( | nm_pkt_wrap | , |
struct nm_pkt_wrap_s * | , | ||
NULL | , | ||
512 | |||
) |
LF queue type for completed pw.
PUK_LFQUEUE_TYPE | ( | nm_req_chunk | , |
struct nm_req_chunk_s * | , | ||
NULL | , | ||
NM_REQ_CHUNK_QUEUE_SIZE | |||
) |
PUK_LIST_CREATE_FUNCS | ( | nm_req | ) |
PUK_LIST_CREATE_FUNCS | ( | nm_req_chunk | ) |
PUK_LIST_CREATE_FUNCS | ( | nm_unexpected_gate | ) |
PUK_LIST_CREATE_FUNCS | ( | nm_unexpected_gtag | ) |
PUK_LIST_CREATE_FUNCS | ( | nm_unexpected_tag | ) |
PUK_LIST_CREATE_FUNCS | ( | nm_unexpected_wildcard | ) |
PUK_LIST_DECLARE_TYPE2 | ( | nm_unexpected_gate | , |
struct nm_unexpected_s | |||
) |
PUK_LIST_DECLARE_TYPE2 | ( | nm_unexpected_gtag | , |
struct nm_unexpected_s | |||
) |
PUK_LIST_DECLARE_TYPE2 | ( | nm_unexpected_tag | , |
struct nm_unexpected_s | |||
) |
PUK_LIST_DECLARE_TYPE2 | ( | nm_unexpected_wildcard | , |
struct nm_unexpected_s | |||
) |
PUK_LIST_TYPE | ( | nm_core_pending_event | , |
struct nm_core_event_s event;struct nm_core_monitor_s *p_core_monitor; | |||
) |
a pending event, not dispatched immediately because it was received out of order
PUK_VECT_TYPE | ( | nm_core_monitor | , |
struct nm_core_monitor_s * | |||
) |