Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a2549ef67 |
No files matched your search
@@ -449,6 +449,48 @@ M_BEGIN_PROTECTED_CODE
|
|||||||
#define M_UNLIKELY_NOMEM(cond) M_UNLIKELY(cond)
|
#define M_UNLIKELY_NOMEM(cond) M_UNLIKELY(cond)
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************/
|
||||||
|
/****************** Function Generation Macro ******************/
|
||||||
|
/***************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Define the expansion logic to define a public / private / type function
|
||||||
|
* for inline expansion
|
||||||
|
*/
|
||||||
|
#define M_EXPAND_FUNC_INLINE(proto, ...) \
|
||||||
|
static inline proto __VA_ARGS__
|
||||||
|
|
||||||
|
#define M_EXPAND_FUNC_INLINE_PRIVATE(...) \
|
||||||
|
__VA_ARGS__
|
||||||
|
|
||||||
|
#define M_EXPAND_FUNC_INLINE_TYPE(...) \
|
||||||
|
__VA_ARGS__
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Define the expansion logic to define a public / private / type function
|
||||||
|
* for inline expansion
|
||||||
|
*/
|
||||||
|
#define M_EXPAND_FUNC_DECL(proto, ...) \
|
||||||
|
extern proto;
|
||||||
|
|
||||||
|
#define M_EXPAND_FUNC_DECL_PRIVATE(...)
|
||||||
|
|
||||||
|
#define M_EXPAND_FUNC_DECL_TYPE(...) \
|
||||||
|
__VA_ARGS__
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Define the expansion logic to define a public / private / type function
|
||||||
|
* for inline expansion
|
||||||
|
*/
|
||||||
|
#define M_EXPAND_FUNC_BODY(proto, ...) \
|
||||||
|
proto __VA_ARGS__
|
||||||
|
|
||||||
|
#define M_EXPAND_FUNC_BODY_PRIVATE(...) \
|
||||||
|
__VA_ARGS__
|
||||||
|
|
||||||
|
#define M_EXPAND_FUNC_BODY_TYPE(...)
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/****************** Preprocessing Times Macro ******************/
|
/****************** Preprocessing Times Macro ******************/
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|||||||
+2
-2
@@ -26,7 +26,7 @@
|
|||||||
#define MSTARLIB_I_LIST_H
|
#define MSTARLIB_I_LIST_H
|
||||||
|
|
||||||
#include "m-core.h"
|
#include "m-core.h"
|
||||||
#include "m-list.h" // For M_L1ST_ITBASE_DEF
|
#include "m-list.h" // For M_L1ST_DEF_ITBASE
|
||||||
|
|
||||||
/* Interface to add to a structure to enable intrusive doubly-linked support.
|
/* Interface to add to a structure to enable intrusive doubly-linked support.
|
||||||
name: name of the intrusive list.
|
name: name of the intrusive list.
|
||||||
@@ -169,7 +169,7 @@ typedef struct m_il1st_head_s {
|
|||||||
M_CHECK_COMPATIBLE_OPLIST(name, 1, type, oplist) \
|
M_CHECK_COMPATIBLE_OPLIST(name, 1, type, oplist) \
|
||||||
M_IL1ST_DEF_CORE(name, type, oplist, list_t, it_t) \
|
M_IL1ST_DEF_CORE(name, type, oplist, list_t, it_t) \
|
||||||
/* Used of internal macro from m-list */ \
|
/* Used of internal macro from m-list */ \
|
||||||
M_L1ST_ITBASE_DEF(name, type, oplist, list_t, it_t)
|
M_L1ST_DEF_ITBASE(M_EXPAND_FUNC_INLINE, name, type, oplist, list_t, it_t)
|
||||||
|
|
||||||
/* Define the type of an intrusive list */
|
/* Define the type of an intrusive list */
|
||||||
#define M_IL1ST_DEF_TYPE(name, type, oplist, list_t, it_t) \
|
#define M_IL1ST_DEF_TYPE(name, type, oplist, list_t, it_t) \
|
||||||
|
|||||||
Reference in new issue
Block a user