提交 711a660d 编写于 作者: C Chuck Ebbert 提交者: Ingo Molnar

[PATCH] mutex subsystem, add typecheck_fn(type, function)

add typecheck_fn(type, function) to do type-checking of function
pointers.
Modified-by: NIngo Molnar <mingo@elte.hu>

(made it typeof() based, instead of typedef based.)
Signed-off-by: NChuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 ffbf670f
......@@ -286,6 +286,15 @@ extern void dump_stack(void);
1; \
})
/*
* Check at compile time that 'function' is a certain type, or is a pointer
* to that type (needs to use typedef for the function type.)
*/
#define typecheck_fn(type,function) \
({ typeof(type) __tmp = function; \
(void)__tmp; \
})
#endif /* __KERNEL__ */
#define SI_LOAD_SHIFT 16
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册