MySQL 9.1.0
Source Code Documentation
simset.h File Reference
#include <stddef.h>
#include "my_compiler.h"
#include "xcom/x_platform.h"

Go to the source code of this file.

Classes

struct  linkage
 

Macros

#define FWD_ITER(head, type, action)
 
#define REV_ITER(head, type, action)
 
#define container_of(ptr, type, member)    ((type *)(((char *)(ptr)) - offsetof(type, member)))
 
#define NULL_TYPE   0xdefaced
 
#define LINK_SANITY_CHECK(x)
 
#define TYPE_SANITY_CHECK(x, y)
 
#define link_into(self, s)   link_precede(self, s)
 
#define TYPE_HASH(x)   0
 

Typedefs

typedef struct linkage linkage
 

Functions

char * dbg_linkage (linkage *self)
 
static linkagelink_out (linkage *self)
 
static linkagelink_first (linkage *self)
 
static linkagelink_last (linkage *self)
 
static linkagelink_extract_first (linkage *self)
 
static linkagelink_extract_last (linkage *self)
 
static int link_empty (linkage *self)
 
static linkagelink_init (linkage *self, unsigned int type)
 
static void link_follow (linkage *self, linkage *ptr)
 
static void link_precede (linkage *self, linkage *ptr)
 
static int cardinal (linkage *self)
 

Macro Definition Documentation

◆ container_of

#define container_of (   ptr,
  type,
  member 
)     ((type *)(((char *)(ptr)) - offsetof(type, member)))

◆ FWD_ITER

#define FWD_ITER (   head,
  type,
  action 
)
Value:
{ \
linkage *p = link_first(head); \
while (p != (head)) { \
linkage *_next = link_first(p); \
{ \
type *link_iter = (type *)p; \
(void)link_iter; \
action; \
} /* Cast to void avoids unused variable warning */ \
p = _next; \
} \
}
const char * p
Definition: ctype-mb.cc:1225
required string type
Definition: replication_group_member_actions.proto:34
static linkage * link_first(linkage *self)
Definition: simset.h:102

◆ link_into

#define link_into (   self,
 
)    link_precede(self, s)

◆ LINK_SANITY_CHECK

#define LINK_SANITY_CHECK (   x)

◆ NULL_TYPE

#define NULL_TYPE   0xdefaced

◆ REV_ITER

#define REV_ITER (   head,
  type,
  action 
)
Value:
{ \
linkage *p = link_last(head); \
while (p != (head)) { \
linkage *_next = link_last(p); \
{ \
type *link_iter = (type *)p; \
(void)link_iter; \
action; \
} /* Cast to void avoids unused variable warning */ \
p = _next; \
} \
}
static linkage * link_last(linkage *self)
Definition: simset.h:104

◆ TYPE_HASH

#define TYPE_HASH (   x)    0

◆ TYPE_SANITY_CHECK

#define TYPE_SANITY_CHECK (   x,
 
)

Typedef Documentation

◆ linkage

typedef struct linkage linkage

Function Documentation

◆ cardinal()

static int cardinal ( linkage self)
inlinestatic

◆ dbg_linkage()

char * dbg_linkage ( linkage self)

◆ link_empty()

static int link_empty ( linkage self)
inlinestatic

◆ link_extract_first()

static linkage * link_extract_first ( linkage self)
inlinestatic

◆ link_extract_last()

static linkage * link_extract_last ( linkage self)
inlinestatic

◆ link_first()

static linkage * link_first ( linkage self)
inlinestatic

◆ link_follow()

static void link_follow ( linkage self,
linkage ptr 
)
inlinestatic

◆ link_init()

static linkage * link_init ( linkage self,
unsigned int  type 
)
inlinestatic

◆ link_last()

static linkage * link_last ( linkage self)
inlinestatic

◆ link_out()

static linkage * link_out ( linkage self)
inlinestatic

◆ link_precede()

static void link_precede ( linkage self,
linkage ptr 
)
inlinestatic