Motr  M0
tlist.c File Reference
#include "lib/ub.h"
#include "ut/ut.h"
#include "lib/types.h"
#include "lib/tlist.h"
Include dependency graph for tlist.c:

Go to the source code of this file.

Data Structures

struct  foo
 
struct  bar
 

Enumerations

enum  { N = 6, NR = 128 }
 
enum  { fl0_magix = 0xab5ce55edba1b0a0 }
 
enum  { UB_ITER = 100000 }
 

Functions

 M0_TL_DESCR_DEFINE (bar, "bar-s", static, struct bar, b_linkage, b_magic, 0xbeda551edcaca0ff, 0x7777777777777777)
 
 M0_TL_DEFINE (bar, static, struct bar)
 
void test_tlist (void)
 
static int ub_init (const char *opts M0_UNUSED)
 
static void ub_fini (void)
 
static void ub_insert (int i)
 
static void ub_delete (int i)
 

Variables

static const struct m0_tl_descr fl0
 
static const struct m0_tl_descr fl1
 
static const struct m0_tl_descr fl2
 
static struct m0_tl head0 [N]
 
static struct m0_tl head1 [N]
 
static struct m0_tl head2 [N]
 
static struct foo amb [NR]
 
static struct m0_tl bhead
 
static struct bar B [NR]
 
static struct foo t [UB_ITER]
 
static struct m0_tl list
 
static struct fooobj
 
struct m0_ub_set m0_tlist_ub
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
NR 

Definition at line 36 of file tlist.c.

◆ anonymous enum

anonymous enum
Enumerator
fl0_magix 

Definition at line 41 of file tlist.c.

◆ anonymous enum

anonymous enum
Enumerator
UB_ITER 

Definition at line 296 of file tlist.c.

Function Documentation

◆ M0_TL_DEFINE()

M0_TL_DEFINE ( bar  ,
static  ,
struct bar   
)

◆ M0_TL_DESCR_DEFINE()

M0_TL_DESCR_DEFINE ( bar  ,
"bar-s ,
static  ,
struct bar  ,
b_linkage  ,
b_magic  ,
0xbeda551edcaca0ff  ,
0x7777777777777777   
)

◆ test_tlist()

void test_tlist ( void  )

Definition at line 84 of file tlist.c.

Here is the call graph for this function:

◆ ub_delete()

static void ub_delete ( int  i)
static

Definition at line 328 of file tlist.c.

Here is the call graph for this function:

◆ ub_fini()

static void ub_fini ( void  )
static

Definition at line 314 of file tlist.c.

Here is the call graph for this function:

◆ ub_init()

static int ub_init ( const char *opts  M0_UNUSED)
static

Definition at line 304 of file tlist.c.

Here is the call graph for this function:

◆ ub_insert()

static void ub_insert ( int  i)
static

Definition at line 323 of file tlist.c.

Here is the call graph for this function:

Variable Documentation

◆ amb

struct foo amb[NR]
static

Definition at line 69 of file tlist.c.

◆ B

struct bar B[NR]
static

Definition at line 82 of file tlist.c.

◆ bhead

struct m0_tl bhead
static

Definition at line 81 of file tlist.c.

◆ fl0

const struct m0_tl_descr fl0
static
Initial value:
= M0_TL_DESCR("foo-s of bar",
struct foo,
f_linkage0,
f_magic,
0xba1dba11adba0bab)
Definition: bob.c:32
#define M0_TL_DESCR(name, ambient_type, link_field, link_magic_field, link_magic, head_magic)
Definition: tlist.h:231

Definition at line 45 of file tlist.c.

◆ fl1

const struct m0_tl_descr fl1
static
Initial value:
= M0_TL_DESCR("other foo-s of bar",
struct foo,
f_linkage1,
f_magic,
0xab5ce55edba1b0a0,
0xbabe1b0ccacc1078)
Definition: bob.c:32
#define M0_TL_DESCR(name, ambient_type, link_field, link_magic_field, link_magic, head_magic)
Definition: tlist.h:231

Definition at line 52 of file tlist.c.

◆ fl2

const struct m0_tl_descr fl2
static
Initial value:
= M0_TL_DESCR("unchecked foo-s of bar",
struct foo,
f_linkage2,
f_magic,
0,
0x0123456789abcdef)
Definition: bob.c:32
#define M0_TL_DESCR(name, ambient_type, link_field, link_magic_field, link_magic, head_magic)
Definition: tlist.h:231

Definition at line 59 of file tlist.c.

◆ head0

struct m0_tl head0[N]
static

Definition at line 66 of file tlist.c.

◆ head1

struct m0_tl head1[N]
static

Definition at line 67 of file tlist.c.

◆ head2

struct m0_tl head2[N]
static

Definition at line 68 of file tlist.c.

◆ list

struct m0_tl list
static

Definition at line 301 of file tlist.c.

◆ m0_tlist_ub

struct m0_ub_set m0_tlist_ub
Initial value:
= {
.us_name = "tlist-ub",
.us_init = ub_init,
.us_fini = ub_fini,
.us_run = {
{ .ub_name = "insert",
.ub_iter = UB_ITER,
.ub_round = ub_insert },
{ .ub_name = "delete",
.ub_iter = UB_ITER,
.ub_round = ub_delete },
{ .ub_name = NULL }
}
}
#define NULL
Definition: misc.h:38
static void ub_insert(int i)
Definition: tlist.c:323
static void ub_fini(void)
Definition: tlist.c:314
Definition: tlist.c:297
static void ub_delete(int i)
Definition: tlist.c:328
static int ub_init(const char *opts M0_UNUSED)
Definition: tlist.c:304

Definition at line 333 of file tlist.c.

◆ obj

struct foo* obj
static

Definition at line 302 of file tlist.c.

◆ t

struct foo t[UB_ITER]
static

Definition at line 300 of file tlist.c.