#include <nm_public.h>#include <nm_log.h>#include <Padico/Puk.h>#include <sys/uio.h>#include <pthread.h>

Go to the source code of this file.
Data Structures | |
| struct | nm_core_internal_s |
| exposed here for inlining; do not use this value, use the accessor nm_core_get_singleton() More... | |
| struct | nm_core_tag_s |
| An internal tag. More... | |
| struct | nm_core_event_s |
| An event, generated by the NewMad core. More... | |
| struct | nm_core_event_matching_s |
| matching info for global monitors More... | |
| struct | nm_monitor_s |
| generic monitor, used for requests and for global events (with matching) More... | |
| struct | nm_core_monitor_s |
| global monitor for status transitions More... | |
| struct | nm_matching_container_s |
| containers for matching info, used for caching More... | |
| struct | nm_core_task_s |
| asynchronous tasks for nmad core. More... | |
| struct | nm_chunk_s |
| struct | nm_req_chunk_s |
| a chunk of request More... | |
| struct | nm_req_s |
| a generic pack/unpack request More... | |
| struct | nm_spinlock_s |
| struct | nm_refcount_s |
| a reference-counter that keeps trace of who increments/decrements in debug: full reference tracking in optimized: a plain counter managed with atomics, and nothing else More... | |
Macros | |
| #define | NM_STATUS_NONE ((nm_status_t)0x00000000) |
| empty request | |
| #define | NM_STATUS_PACK_INIT ((nm_status_t)0x00000001) |
| request initialized, not sent yet | |
| #define | NM_STATUS_UNPACK_INIT ((nm_status_t)0x00000002) |
| request initialized, not sent yet | |
| #define | NM_STATUS_PACK_COMPLETED ((nm_status_t)0x00000004) |
| sending operation has completed | |
| #define | NM_STATUS_UNPACK_COMPLETED ((nm_status_t)0x00000008) |
| unpack operation has completed | |
| #define | NM_STATUS_UNEXPECTED ((nm_status_t)0x00000010) |
| data or rdv has arrived, with no matching unpack | |
| #define | NM_STATUS_UNPACK_CANCELLED ((nm_status_t)0x00000020) |
| unpack operation has been cancelled | |
| #define | NM_STATUS_PACK_POSTED ((nm_status_t)0x00000040) |
| sending operation is in progress | |
| #define | NM_STATUS_UNPACK_POSTED ((nm_status_t)0x00000080) |
| unpack operation is in progress | |
| #define | NM_STATUS_ACK_RECEIVED ((nm_status_t)0x00000100) |
| ack received for the given pack | |
| #define | NM_STATUS_UNPACK_DATA0 ((nm_status_t)0x00000200) |
| first byte of data arrived, not unpacked yet- event triggered only if unpack is posted without data spec | |
| #define | NM_STATUS_UNPACK_DATA_SIZE ((nm_status_t)0x00000400) |
| size of data is known (last chunk of data arrived), not unpacked yet- event triggered only if unpack is posted without data spec | |
| #define | NM_STATUS_FINALIZED ((nm_status_t)0x00000800) |
| request is finalized, may be freed | |
| #define | NM_STATUS_ERROR ((nm_status_t)0x00001000) |
| request is in error; see error state in request | |
| #define | NM_STATUS_PACK_MSG_SIZE ((nm_status_t)0x00002000) |
| msg size already sent; used only if flag pack_partitioned is set | |
| #define | NM_STATUS_UNPACK_PREFETCHED ((nm_status_t)0x00004000) |
| flag unpack request as prefetched | |
| #define | NM_STATUS_MASK_FULL ((nm_status_t)-1) |
| mask to catch all bits of status | |
| #define | NM_REQ_FLAG_NONE ((nm_req_flag_t)0x00000000) |
| no flag set | |
| #define | NM_REQ_FLAG_PACK_SYNCHRONOUS ((nm_req_flag_t)0x00001000) |
| flag pack as synchronous (i.e. | |
| #define | NM_REQ_FLAG_PACK ((nm_req_flag_t)0x00002000) |
| request is a pack | |
| #define | NM_REQ_FLAG_UNPACK ((nm_req_flag_t)0x00004000) |
| request is an unpack | |
| #define | NM_REQ_FLAG_UNPACK_DATA_INFO ((nm_req_flag_t)0x00008000) |
| flag unpack request as data information present | |
| #define | NM_REQ_FLAG_UNPACK_MATCHING_INFO ((nm_req_flag_t)0x00010000) |
| flag unpack request as matching information present | |
| #define | NM_REQ_FLAG_UNPACK_PREFETCHING ((nm_req_flag_t)0x00020000) |
| flag unpack request needs prefetching | |
| #define | NM_REQ_FLAG_MATCHING_WILDCARD ((nm_req_flag_t)0x00100000) |
| request submited in wildcard queue | |
| #define | NM_REQ_FLAG_MATCHING_GATE ((nm_req_flag_t)0x00200000) |
| request matching performed by gate | |
| #define | NM_REQ_FLAG_MATCHING_TAG ((nm_req_flag_t)0x00400000) |
| request matching performed by tag | |
| #define | NM_REQ_FLAG_MATCHING_FULL ((nm_req_flag_t)0x00800000) |
| request matching by gate + tag | |
| #define | NM_REQ_FLAG_FINALIZE_LATER ((nm_req_flag_t)0x01000000) |
| statuses NM_STATUS_UNPACK_COMPLETED and NM_STATUS_FINALIZED will be set separately | |
| #define | NM_REQ_FLAG_UNPACK_PARTITIONED ((nm_req_flag_t)0x02000000) |
| unpack request is partitioned; each chunk whill be notified separately | |
| #define | NM_REQ_FLAG_PACK_PARTITIONED ((nm_req_flag_t)0x04000000) |
| pack request is partitioned; send a separate msg header before data chunks | |
| #define | NM_REQ_CHUNK_FLAG_NONE ((nm_req_chunk_flag_t)0x00000000) |
| no flag set | |
| #define | NM_REQ_CHUNK_FLAG_SHORT ((nm_req_chunk_flag_t)0x00020000) |
| flag req_chunk as short | |
| #define | NM_REQ_CHUNK_FLAG_USE_COPY ((nm_req_chunk_flag_t)0x00080000) |
| flatten data as contiguous block before send | |
| #define | NM_REQ_CHUNK_FLAG_DATA_ITERATOR ((nm_req_chunk_flag_t)0x00100000) |
| use iterator-based data description in pw | |
| #define | NM_CORE_TAG_HASH_FULL ((nm_session_hash_t)0xFFFFFFFF) |
| mask for all sessions | |
| #define | NM_CORE_TAG_MASK_FULL ((nm_core_tag_t){ .tag = NM_TAG_MASK_FULL, .hashcode = NM_CORE_TAG_HASH_FULL }) |
| #define | NM_CORE_TAG_NONE ((nm_core_tag_t){ .tag = 0, .hashcode = 0x0 }) |
| #define | NM_EVENT_MATCHING_ANY ((struct nm_core_event_matching_s){ .p_gate = NM_ANY_GATE, .tag = NM_CORE_TAG_NONE, .tag_mask = NM_CORE_TAG_NONE }) |
| matches any event | |
| #define | NM_MONITOR_NULL ((struct nm_monitor_s){ .p_notifier = NULL, .event_mask = 0, .ref = NULL }) |
| #define | NM_CORE_MONITOR_NULL ((struct nm_core_monitor_s){ .monitor = NM_MONITOR_NULL, .matching = NM_EVENT_MATCHING_ANY }) |
| #define | NM_MATCHING_CONTAINER_NULL ((struct nm_matching_container_s) { NULL }) |
| #define | nm_refcount_inc(REFCOUNT, HOLDER) nm_refcount_inc_internal(REFCOUNT, HOLDER, __FUNCTION__, __FILE__, __LINE__) |
Typedefs | |
| typedef struct nm_core * | nm_core_t |
| typedef struct nm_drv_s * | nm_drv_t |
| a nmad driver; opaque type for the user | |
| typedef enum nm_thread_level_e | nm_thread_level_t |
| typedef uint32_t | nm_status_t |
| status bits of pack/unpack requests | |
| typedef nm_status_t | nm_cond_status_t |
| status with synchronization (wait/signal) | |
| typedef uint32_t | nm_req_flag_t |
| pack/unpack flags | |
| typedef uint32_t | nm_req_chunk_flag_t |
| flags for req_chunk | |
| typedef uint32_t | nm_session_hash_t |
| a session hashcode in tags, used to multiplex sessions | |
| typedef struct nm_core_tag_s | nm_core_tag_t |
| typedef void(* | nm_core_event_notifier_t) (const struct nm_core_event_s *const event, void *ref) |
| an event notifier, fired upon status transition | |
| typedef enum nm_core_task_kind_e | nm_core_task_kind_t |
| typedef void(* | nm_injector_pull_data_t) (struct nm_req_s *p_req, const struct nm_data_s *p_data, nm_len_t chunk_offset, nm_len_t chunk_len, void *p_ref) |
| user-supplied function called to pull data to posted request through nmad core p_req is the user request that matched this chunk p_data is the memory buffer where to copy the chunk (may be different from p_req->data in case we are actually peeking. | |
| typedef struct nm_spinlock_s | nm_spinlock_t |
Enumerations | |
| enum | nm_thread_level_e { NM_THREAD_SINGLE = 0 , NM_THREAD_FUNNELED = 1 , NM_THREAD_SERIALIZED = 2 , NM_THREAD_MULTIPLE = 3 } |
| enum | nm_core_task_kind_e { NM_CORE_TASK_INVALID = -1 , NM_CORE_TASK_NONE = 0 , NM_CORE_TASK_NOP = 1 , NM_CORE_TASK_UNPACK_NEXT = 2 , NM_CORE_TASK_COMPLETED_PW = 3 , NM_CORE_TASK_COMPLETED_PREFETCH = 4 , NM_CORE_TASK_CANCELLED_PREFETCH = 5 , NM_CORE_TASK_PACK_SUBMISSION = 6 , NM_CORE_TASK_RTR_SEND = 7 , NM_CORE_TASK_HANDLER = 8 } |
Functions | |
| puk_component_t | nm_core_component_load (const char *entity, const char *name) |
| int | nm_core_init (nm_core_t *pp_core) |
| int | nm_core_set_strategy (nm_core_t p_core, puk_component_t strategy) |
| int | nm_core_exit (nm_core_t p_core) |
| void | nm_core_schedopt_disable (nm_core_t p_core) |
| disable schedopt for raw driver use | |
| __attribute__ ((pure)) static inline nm_core_t nm_core_get_singleton(void) | |
| void | nm_trace_add_synchro_point (void) |
| generate a synchronization event to synchronize nmad traces with others (e.g. | |
| PUK_VECT_TYPE (nm_drv, nm_drv_t) | |
| int | nm_core_driver_load_init (nm_core_t p_core, puk_component_t driver, nm_trk_kind_t kind, nm_drv_t *pp_drv, const char **p_url) |
| nm_gate_t | nm_core_gate_new (nm_core_t p_core, nm_drv_vect_t *p_drvs) |
| Init a new gate, using the given set of drivers. | |
| void | nm_core_gate_connect_async (nm_core_t p_core, nm_gate_t gate, nm_drv_t p_drv, nm_trk_id_t trk_id, const char *url) |
| start connection process on given gate/trk | |
| void | nm_core_gate_connect_wait (nm_core_t p_core, struct nm_trk_s *p_trk) |
| wait for connection completion | |
| nm_thread_level_t | nm_core_get_thread_level (nm_core_t) |
| Get the current thread level. | |
| void | nm_core_set_thread_level (nm_thread_level_t) |
| Sets the thread level before nm core init. | |
| int | nm_schedule (nm_core_t p_core) |
| struct nm_core_tag_s | __attribute__ ((packed)) |
| static nm_core_tag_t | nm_core_tag_build (nm_session_hash_t hashcode, nm_tag_t tag) |
| static nm_tag_t | nm_core_tag_get_tag (nm_core_tag_t core_tag) |
| static nm_session_hash_t | nm_core_tag_get_hashcode (nm_core_tag_t core_tag) |
| void | nm_core_monitor_add (nm_core_t p_core, struct nm_core_monitor_s *m) |
| Register an event monitor. | |
| void | nm_core_monitor_remove (nm_core_t p_core, struct nm_core_monitor_s *m) |
| Unregister an event monitor. | |
| void | nm_core_req_monitor (struct nm_core *p_core, struct nm_req_s *p_req, struct nm_monitor_s monitor) |
| set a per-request monitor. | |
| void | nm_core_task_submit_locked (struct nm_core *p_core, void(*p_handler)(void)) |
| lock then submit task to pending list This is used mostly for benchmarks. | |
| void | nm_core_task_submit_unlocked (struct nm_core *p_core, void(*p_handler)(void)) |
| submit task lock-free to the submission list This is used mostly for benchmarks. | |
| PUK_LIST_DECLARE_TYPE (nm_req_chunk) | |
| PUK_LIST_DECLARE_TYPE (nm_req) | |
| void | nm_core_pack_init (struct nm_core *p_core, struct nm_req_s *p_pack) |
| initializes an empty pack request | |
| void | nm_core_pack_data (nm_core_t p_core, struct nm_req_s *p_pack, const struct nm_data_s *p_data) |
| build a pack request from data descriptor | |
| void | nm_core_pack_send (struct nm_core *p_core, struct nm_req_s *p_pack, nm_core_tag_t tag, nm_gate_t p_gate, nm_req_flag_t flags) |
| set tag/gate/flags for pack request | |
| void | nm_core_pack_submit (struct nm_core *p_core, struct nm_req_s *p_pack) |
| post a pack request | |
| void | nm_core_pack_set_priority (struct nm_core *p_core, struct nm_req_s *p_pack, nm_prio_t priority) |
| set a priority for the given pack request | |
| static void | nm_core_pack_set_hlen (struct nm_core *p_core __attribute__((unused)), struct nm_req_s *p_pack, nm_len_t hlen) |
| set a header length for the given pack request | |
| void | nm_core_pack_submit_chunks (struct nm_core *p_core, struct nm_req_s *p_pack, int n, const struct nm_chunk_s *p_chunks) |
| void | nm_core_unpack_init (struct nm_core *p_core, struct nm_req_s *p_unpack) |
| initializes an empty unpack request | |
| void | nm_core_unpack_offset (struct nm_core *p_core, struct nm_req_s *p_unpack, nm_len_t offset) |
| set an offset on data; data before offset will be discarded | |
| void | nm_core_unpack_data (struct nm_core *p_core, struct nm_req_s *p_unpack, const struct nm_data_s *p_data) |
| build an unpack request from data descriptor | |
| void | nm_core_unpack_match_recv (struct nm_core *p_core, struct nm_req_s *p_unpack, nm_gate_t p_gate, nm_core_tag_t tag, nm_core_tag_t tag_mask) |
| match an unpack request with given gate/tag, next sequence number assumed | |
| void | nm_core_unpack_match_event (struct nm_core *p_core, struct nm_req_s *p_unpack, const struct nm_core_event_s *p_event) |
| match an unpack request with a packet that triggered an event | |
| void | nm_core_unpack_submit (struct nm_core *p_core, struct nm_req_s *p_unpack, nm_req_flag_t flags) |
| submit an unpack request | |
| int | nm_core_unpack_peek (struct nm_core *p_core, struct nm_req_s *p_unpack, const struct nm_data_s *p_data, nm_len_t peek_offset, nm_len_t peek_len) |
| peeks unexpected data without consumming it. | |
| int | nm_core_unpack_iprobe (struct nm_core *p_core, struct nm_req_s *p_unpack) |
| probes whether an incoming packet matched this unposted request. | |
| int | nm_core_unpack_cancel (struct nm_core *p_core, struct nm_req_s *p_unpack) |
| cancel a pending unpack | |
| int | nm_core_iprobe (struct nm_core *p_core, nm_gate_t p_gate, nm_core_tag_t tag, nm_core_tag_t tag_mask, nm_gate_t *pp_out_gate, nm_core_tag_t *p_out_tag, nm_len_t *p_out_size) |
| probe unexpected packet, check matching for (packet_tag & tag_mask) == tag | |
| void | nm_core_flush (struct nm_core *p_core) |
| Flush pending packs (if supported by the strategy). | |
| nm_seq_t | nm_core_send_seq_get (struct nm_core *p_core, nm_gate_t p_gate, nm_core_tag_t tag) |
| get a seq number in the out stream, to route packet outside of nmad core | |
| void | nm_core_inject_chunk (struct nm_core *p_core, nm_gate_t p_gate, nm_core_tag_t tag, nm_seq_t seq, nm_len_t chunk_offset, nm_len_t chunk_len, int is_last_chunk, nm_injector_pull_data_t p_pull_data, void *p_ref) |
| inject a packet in nmad core as if it arrived from network. | |
| void | nm_core_inject_complete (struct nm_core *p_core, struct nm_req_s *p_req, nm_len_t chunk_offset, nm_len_t chunk_len) |
| notify data was injected in a matched request, but do not finalize the request (the status will be NM_STATUS_UNPACK_COMPLETED). | |
| void | nm_core_inject_finalize (struct nm_core *p_core, struct nm_req_s *p_req) |
| finalize an injected request that was only completed. | |
| void | nm_core_inject_complete_finalize (struct nm_core *p_core, struct nm_req_s *p_req, nm_len_t chunk_offset, nm_len_t chunk_len) |
| notify data was injected in a matched request and finalize this request. | |
| void | nm_core_unpack_partition_set (struct nm_req_s *p_unpack, int n_partitions) |
| void | nm_core_unpack_partition_free (struct nm_req_s *p_unpack) |
| int | nm_core_unpack_partition_test (struct nm_req_s *p_unpack, int partition) |
| 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 | |
| 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 | |
| static void | nm_spin_init (nm_spinlock_t *p_spin) |
| init the spin lock | |
| static void | nm_spin_destroy (nm_spinlock_t *p_spin) |
| destroy the spin lock | |
| static void | nm_spin_lock (nm_spinlock_t *p_spin) |
| acquire the spin lock | |
| static void | nm_spin_unlock (nm_spinlock_t *p_spin) |
| release the spin lock | |
| static int | nm_spin_trylock (nm_spinlock_t *p_spin) |
| try to lock the spin lock return 1 if lock is successfully acquired, 0 otherwise | |
| static void | nm_spin_assert_locked (nm_spinlock_t *p_spin) |
| assert that current thread holds the lock | |
| static void | nm_spin_assert_notlocked (nm_spinlock_t *p_spin) |
| assert that current thread doesn't hold the lock | |
| static void | nm_spin_check_nothread (nm_spinlock_t *p_spin __attribute__((unused))) |
| check that we are always called from the same thread in case of non-threaded mode | |
| static void | nm_spin_clear_nothread (nm_spinlock_t *p_spin __attribute__((unused))) |
| clear the last_tid tracking for lock consistency checking | |
| static void | nm_spin_init (nm_spinlock_t *p_spin __attribute__((unused))) |
| static void | nm_spin_destroy (nm_spinlock_t *p_spin __attribute__((unused))) |
| static void | nm_spin_lock (nm_spinlock_t *p_spin __attribute__((unused))) |
| static void | nm_spin_unlock (nm_spinlock_t *p_spin __attribute__((unused))) |
| static int | nm_spin_trylock (nm_spinlock_t *p_spin __attribute__((unused))) |
| static void | nm_spin_assert_locked (nm_spinlock_t *p_spin __attribute__((unused))) |
| static void | nm_spin_assert_notlocked (nm_spinlock_t *p_spin __attribute__((unused))) |
| PUK_LIST_TYPE (nm_refcount_holder, const void *p_holder;const char *func;const char *file;int line;) | |
| elements for nm_refcount_s; a holder in the refcount | |
| static void | nm_refcount_dump (struct nm_refcount_s *p_refcount __attribute__((unused))) |
| static void | nm_refcount_destroy (struct nm_refcount_s *p_refcount __attribute__((unused))) |
| static int | nm_refcount_get (struct nm_refcount_s *p_refcount) |
| static void | nm_refcount_inc_internal (struct nm_refcount_s *p_refcount, const void *p_holder __attribute__((unused)), const char *func __attribute__((unused)), const char *file __attribute__((unused)), const int line __attribute__((unused))) |
| static int | nm_refcount_dec (struct nm_refcount_s *p_refcount, const void *p_holder __attribute__((unused))) |
| decrement refcount for holder; returns refcount (if 0, caller may free ref-counted resource) | |
| static void | nm_refcount_init (struct nm_refcount_s *p_refcount, char *p_object_id, const void *p_init_holder) |
| initialize a new refcount object; get the object ID to make debugging easier; we take ownership of object_id p_init_holder is the holder for the first reference. | |
| static void | nm_cond_init (nm_cond_status_t *p_cond, nm_status_t bitmask) |
| initialize a nm_cond_status_t object | |
| static void | nm_cond_destroy (nm_cond_status_t *p_cond) |
| free resources associated with a nm_cond_status_t object | |
| 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 | |
| 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 | |
| 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) | |
| 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 | |
| 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 | |
| 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 | |
| static void | nm_cond_destroy (nm_cond_status_t *p_cond __attribute__((unused))) |
| static void | nm_cond_mask (nm_cond_status_t *p_cond, nm_status_t bitmask) |
Variables | |
| struct nm_core_internal_s | nm_core_internal |
| nm_tag_t | tag |
| the user-supplied tag | |
| nm_session_hash_t | hashcode |
| the session hashcode | |
| struct nm_core_event_s | __attribute__ |
Macro Definition Documentation
◆ nm_refcount_inc
| #define nm_refcount_inc | ( | REFCOUNT, | |
| HOLDER | |||
| ) | nm_refcount_inc_internal(REFCOUNT, HOLDER, __FUNCTION__, __FILE__, __LINE__) |
Definition at line 1257 of file nm_core_interface.h.
Function Documentation
◆ nm_refcount_dec()
|
inlinestatic |
decrement refcount for holder; returns refcount (if 0, caller may free ref-counted resource)
Definition at line 1315 of file nm_core_interface.h.
References assert(), count, nm_atomic_dec(), NM_FATAL, nm_spin_lock(), nm_spin_unlock(), and nm_refcount_s::refcount.
Referenced by nm_pw_ref_dec().

◆ nm_refcount_destroy()
|
inlinestatic |
Definition at line 1242 of file nm_core_interface.h.
References nm_refcount_dump(), and nm_spin_destroy().

◆ nm_refcount_dump()
|
inlinestatic |
Definition at line 1230 of file nm_core_interface.h.
References NM_WARN.
Referenced by nm_refcount_destroy().
◆ nm_refcount_get()
|
inlinestatic |
Definition at line 1252 of file nm_core_interface.h.
References nm_refcount_s::refcount.
Referenced by nm_pw_ref_dec_free().
◆ nm_refcount_inc_internal()
|
inlinestatic |
Definition at line 1285 of file nm_core_interface.h.
References assert(), nm_atomic_inc(), nm_spin_lock(), nm_spin_unlock(), NM_WARN, and nm_refcount_s::refcount.

◆ nm_refcount_init()
|
inlinestatic |
initialize a new refcount object; get the object ID to make debugging easier; we take ownership of object_id p_init_holder is the holder for the first reference.
Definition at line 1347 of file nm_core_interface.h.
References nm_spin_init(), and nm_refcount_s::refcount.
Referenced by nm_mpi_refcount_init().

◆ PUK_LIST_TYPE()
| PUK_LIST_TYPE | ( | nm_refcount_holder | , |
| const void *p_holder;const char *func;const char *file;int line; | |||
| ) |
elements for nm_refcount_s; a holder in the refcount
Variable Documentation
◆ hashcode
| nm_session_hash_t hashcode |
the session hashcode
Definition at line 1 of file nm_core_interface.h.
Referenced by nm_core_tag_build().
◆ tag
| nm_tag_t tag |
the user-supplied tag
- Examples
- nm_mcast_basic.c, nm_onesided_queues.c, nm_onesided_simple.c, nm_rpc_hello.c, and nm_sr_custom_data.c.
Definition at line 0 of file nm_core_interface.h.
Referenced by nm_coll_tree_status_init(), nm_core_post_ack(), nm_core_post_msg(), nm_core_post_rtr(), nm_core_tag_build(), nm_examples_barrier(), nm_header_init_ack(), nm_header_init_rtr(), nm_mpi_rma_tag_to_mpi_op(), nm_mpi_rma_tag_to_seq(), nm_mpi_rma_tag_to_win(), nm_rpc_get_tag(), nm_rpc_send(), nm_sr_irecv(), nm_sr_irecv_data(), nm_sr_irecv_iov(), nm_sr_irecv_iov_with_ref(), nm_sr_irecv_with_ref(), nm_sr_isend(), nm_sr_isend_data(), nm_sr_isend_iov(), nm_sr_isend_iov_with_ref(), nm_sr_isend_with_ref(), nm_sr_issend(), nm_sr_recv(), nm_sr_recv_data(), nm_sr_recv_irecv(), nm_sr_recv_match(), nm_sr_rsend(), nm_sr_send(), nm_sr_send_data(), nm_sr_send_dest(), nm_sr_send_isend(), nm_sr_send_issend(), nm_sr_send_rsend(), nm_sync_clocks_bcast(), nm_sync_clocks_gather(), nm_sync_clocks_nm_barrier(), nm_sync_clocks_recv(), and nm_sync_clocks_send().