#include <kern/smr_types.h>

kern/smr_types.h Kernel.framework

includes: sys/cdefs.h, Kernel/stdbool.h, Kernel/stdint.h, os/base.h
9 structs · 6 typedefs · 6 macros

typedefsmr_seq_t

@typedef smr_seq_t @brief Represents an opaque SMR sequence number.
typedef unsigned long smr_seq_t

typedefsmr_t

@typedef smr_t @brief Type for an SMR domain.
typedef struct smr *smr_t

typedefsmr_node_t

@typedef smr_node_t @brief Intrusive data structure used with @c ssmr_call() to defer callbacks to a safe time.
typedef struct smr_node *smr_node_t

typedefsmr_cb_t

@typedef smr_cb_t @brief A callback acting on an @c smr_node_t to destroy it.
typedef void (*smr_cb_t)(smr_node_t)

structsmr_node

size 16, align 8
struct smr_node *smrn_next
smr_cb_tsmrn_cb

macroSMR_POINTER_DECL

@macro SMR_POINTER_DECL @brief Macro to declare a pointer type that uses SMR for access.
#define SMR_POINTER_DECL(name, type_t) struct name { type_t volatile __smr_ptr; }

macroSMR_POINTER

@macro SMR_POINTER @brief Macro to declare a pointer that uses SMR for access.
#define SMR_POINTER(type_t) SMR_POINTER_DECL(, type_t)

structsmrq_slist_head

@struct smrq_slist_head @brief Type used to represent the head of a singly linked list. @discussion This must be used with @c smrq_slink linkages. This type supports: - insertion at the head, - O(n) removal / replacement.
size 8, align 8
__smrq_slink_tfirst

macroSMRQ_SLIST_INITIALIZER

#define SMRQ_SLIST_INITIALIZER(name) { .first = { NULL } }

structsmrq_list_head

@struct smrq_list_head @brief Type used to represent the head of a doubly linked list. @discussion This must be used with @c smrq_link linkages. This type supports: - insertion at the head, - O(1) removal / replacement.
size 8, align 8
__smrq_link_tfirst

macroSMRQ_LIST_INITIALIZER

#define SMRQ_LIST_INITIALIZER(name) { .first = { NULL } }

structsmrq_stailq_head

@struct smrq_stailq_head @brief Type used to represent the head of a singly linked tail-queue. @discussion This must be used with @c smrq_slink linkages. This type supports: - insertion at the head, - insertion at the tail, - O(n) removal / replacement.
size 16, align 8
__smrq_slink_tfirst
__smrq_slink_t *last

macroSMRQ_STAILQ_INITIALIZER

#define SMRQ_STAILQ_INITIALIZER(name) { .first = { NULL }, .last = &(name).first }

structsmrq_tailq_head

@struct smrq_tailq_head @brief Type used to represent the head of a doubly linked tail-queue. @discussion This must be used with @c smrq_link linkages. This type supports: - insertion at the head, - insertion at the tail, - O(1) removal / replacement.
size 16, align 8
__smrq_link_tfirst
__smrq_link_t *last

macroSMRQ_TAILQ_INITIALIZER

#define SMRQ_TAILQ_INITIALIZER(name) { .first = { NULL }, .last = &(name).first }