mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-12-26 11:17:44 +01:00
chore[kmpp_obj]: Update macros
1. Remove init / deinit function in kmpp_obj_func.h 2. Add extern "C" in kmpp_obj_func.h 3. Set register / unregister function in kmpp_obj_helper.h to be static Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: Ic7210c8114f4a3fc9fc94f69f350c586d6bdd3d2
This commit is contained in:
parent
a30fe2262b
commit
20d045ae2c
2 changed files with 11 additions and 4 deletions
|
|
@ -17,15 +17,22 @@
|
|||
|
||||
/* always define object common function */
|
||||
#define KMPP_OBJ_FUNC_DEFINE(prefix) \
|
||||
rk_s32 CONCAT_US(prefix, init)(void); \
|
||||
rk_s32 CONCAT_US(prefix, deinit)(void); \
|
||||
rk_s32 CONCAT_US(prefix, size)(void); \
|
||||
rk_s32 CONCAT_US(prefix, get)(KMPP_OBJ_INTF_TYPE *p); \
|
||||
rk_s32 CONCAT_US(prefix, assign)(KMPP_OBJ_INTF_TYPE *p, void *buf, rk_s32 size); \
|
||||
rk_s32 CONCAT_US(prefix, put)(KMPP_OBJ_INTF_TYPE p); \
|
||||
rk_s32 CONCAT_US(prefix, dump)(KMPP_OBJ_INTF_TYPE p, const char *caller);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
KMPP_OBJ_FUNC_DEFINE(KMPP_OBJ_NAME)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef KMPP_OBJ_FUNC_DEFINE
|
||||
|
||||
/* entry and hook access funcitons */
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ KMPP_OBJ_ENTRY_TABLE(KMPP_OBJ_NAME, VAL_ENTRY_TBL, VAL_ENTRY_TBL,
|
|||
|
||||
#endif
|
||||
|
||||
void CONCAT_US(KMPP_OBJ_NAME, register)(void)
|
||||
static void CONCAT_US(KMPP_OBJ_NAME, register)(void)
|
||||
{
|
||||
mpp_env_get_u32(TO_STR(CONCAT_US(KMPP_OBJ_NAME, debug)), &KMPP_OBJ_DEF_DEUBG(KMPP_OBJ_NAME), 0);
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ void CONCAT_US(KMPP_OBJ_NAME, register)(void)
|
|||
KMPP_OBJ_DBG_LOG("register leave\n");
|
||||
}
|
||||
|
||||
void CONCAT_US(KMPP_OBJ_NAME, unregister)(void)
|
||||
static void CONCAT_US(KMPP_OBJ_NAME, unregister)(void)
|
||||
{
|
||||
KmppObjDef def = __sync_fetch_and_and(&KMPP_OBJ_DEF(KMPP_OBJ_NAME), NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue