MOS Source Code
Loading...
Searching...
No Matches
slab_autoinit.h File Reference
#include "mos/misc/setup.h"
+ Include dependency graph for slab_autoinit.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _DO_SLAB_AUTOINIT(name, var, type, func)
 
#define SLAB_AUTOINIT(name, var, type)
 

Macro Definition Documentation

◆ _DO_SLAB_AUTOINIT

#define _DO_SLAB_AUTOINIT ( name,
var,
type,
func )
Value:
static void func(void) \
{ \
var = kmemcache_create(name, sizeof(type)); \
} \
MOS_INIT(SLAB_AUTOINIT, func)
const char * name
Definition slab.c:31
slab_t * kmemcache_create(const char *name, size_t ent_size)
Definition slab.c:219
#define SLAB_AUTOINIT(name, var, type)

Definition at line 7 of file slab_autoinit.h.

◆ SLAB_AUTOINIT

#define SLAB_AUTOINIT ( name,
var,
type )
Value:
_DO_SLAB_AUTOINIT(name, var, type, MOS_CONCAT(__slab_autoinit_, __COUNTER__))
#define MOS_CONCAT(a, b)
Definition mos_global.h:67
#define _DO_SLAB_AUTOINIT(name, var, type, func)

Definition at line 14 of file slab_autoinit.h.