#include <kern/smr_types.h>
kern/smr_types.h
typedefsmr_seq_t
@typedef smr_seq_t
@brief Represents an opaque SMR sequence number.
typedef unsigned long smr_seq_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 void (*smr_cb_t)(smr_node_t)
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)
struct__smrq_slink_t
internal types that clients should not use directly
| struct smrq_slink *volatile | __smr_ptr |
typedef__smrq_slink_t
typedef SMR_POINTER(struct smrq_slink *) __smrq_slink_t
struct__smrq_link_t
| struct smrq_link *volatile | __smr_ptr |
typedef__smrq_link_t
typedef SMR_POINTER(struct smrq_link *) __smrq_link_t
structsmrq_slink
@struct smrq_slink
@brief Type used to represent a linkage in an SMR queue
(single form, with O(n) deletion).
| __smrq_slink_t | next |
structsmrq_link
@struct smrq_link
@brief Type used to represent a linkage in an SMR queue
(double form, with O(1) deletion).
| __smrq_link_t | next | |
| __smrq_link_t * | prev |
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.
| __smrq_slink_t | first |
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.
| __smrq_link_t | first |
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.
| __smrq_slink_t | first | |
| __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.
| __smrq_link_t | first | |
| __smrq_link_t * | last |
macroSMRQ_TAILQ_INITIALIZER
#define SMRQ_TAILQ_INITIALIZER(name) { .first = { NULL }, .last = &(name).first }