diff options
Diffstat (limited to 'include/rtdef.h')
| -rw-r--r-- | include/rtdef.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/rtdef.h b/include/rtdef.h index 50a02c56a3..e1dddcdcc2 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -264,6 +264,17 @@ struct rt_object_information rt_list_t object_list; /**< object list */ rt_size_t object_size; /**< object size */ }; + +/** + * The hook function call macro + */ +#ifdef RT_USING_HOOK +#define RT_OBJECT_HOOK_CALL(func, argv) \ + do { if ((func) != RT_NULL) func argv; } while (0) +#else +#define RT_OBJECT_HOOK_CALL(func, argv) +#endif + /*@}*/ /** |
