From c89c44512fdd7236617ace68cdddd656e939d4fb Mon Sep 17 00:00:00 2001 From: ChenHengming Date: Fri, 7 Aug 2015 08:50:52 +0000 Subject: [PATCH] [all]: change osal file name prefix from rk_ to mpp_ git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@58 6e48237b-75ef-9749-8fc9-41990f28c85a --- inc/{rk_err.h => mpp_err.h} | 10 ++++++---- inc/rk_type.h | 1 - osal/CMakeLists.txt | 8 ++++---- osal/{rk_env.cpp => mpp_env.cpp} | 0 osal/{rk_list.cpp => mpp_list.cpp} | 0 osal/{rk_log.cpp => mpp_log.cpp} | 0 osal/{rk_malloc.cpp => mpp_malloc.cpp} | 3 ++- osal/test/CMakeLists.txt | 8 ++++---- osal/test/{rk_env_test.c => mpp_env_test.c} | 0 osal/test/{rk_log_test.c => mpp_log_test.c} | 0 osal/test/{rk_malloc_test.c => mpp_malloc_test.c} | 0 osal/test/{rk_thread_test.c => mpp_thread_test.c} | 0 12 files changed, 16 insertions(+), 14 deletions(-) rename inc/{rk_err.h => mpp_err.h} (75%) rename osal/{rk_env.cpp => mpp_env.cpp} (100%) rename osal/{rk_list.cpp => mpp_list.cpp} (100%) rename osal/{rk_log.cpp => mpp_log.cpp} (100%) rename osal/{rk_malloc.cpp => mpp_malloc.cpp} (93%) rename osal/test/{rk_env_test.c => mpp_env_test.c} (100%) rename osal/test/{rk_log_test.c => mpp_log_test.c} (100%) rename osal/test/{rk_malloc_test.c => mpp_malloc_test.c} (100%) rename osal/test/{rk_thread_test.c => mpp_thread_test.c} (100%) diff --git a/inc/rk_err.h b/inc/mpp_err.h similarity index 75% rename from inc/rk_err.h rename to inc/mpp_err.h index 1d1f4d25..bca87d53 100644 --- a/inc/rk_err.h +++ b/inc/mpp_err.h @@ -14,13 +14,15 @@ * limitations under the License. */ -#ifndef __RK_ERR_H__ -#define __RK_ERR_H__ +#ifndef __MPP_ERR_H__ +#define __MPP_ERR_H__ #define RK_OK 0 +#define RK_SUCCESS 0 typedef enum { - RK_SUCCESS = RK_OK, + MPP_SUCCESS = RK_SUCCESS, + MPP_OK = RK_OK, } RK_RET; -#endif /*__RK_ERR_H__*/ +#endif /*__MPP_ERR_H__*/ diff --git a/inc/rk_type.h b/inc/rk_type.h index 11665db9..4b736c54 100644 --- a/inc/rk_type.h +++ b/inc/rk_type.h @@ -25,7 +25,6 @@ #define __RK_TYPE_H__ #include -#include "rk_err.h" #if defined(_WIN32) && !defined(__MINGW32CE__) diff --git a/osal/CMakeLists.txt b/osal/CMakeLists.txt index 1699c1cb..056062c7 100644 --- a/osal/CMakeLists.txt +++ b/osal/CMakeLists.txt @@ -12,10 +12,10 @@ endif() include_directories(.) add_library(osal STATIC - rk_malloc.cpp - rk_list.cpp - rk_env.cpp - rk_log.cpp + mpp_malloc.cpp + mpp_list.cpp + mpp_env.cpp + mpp_log.cpp ${OS_DIR}/os_malloc.c ${OS_DIR}/os_env.c ${OS_DIR}/os_log.c diff --git a/osal/rk_env.cpp b/osal/mpp_env.cpp similarity index 100% rename from osal/rk_env.cpp rename to osal/mpp_env.cpp diff --git a/osal/rk_list.cpp b/osal/mpp_list.cpp similarity index 100% rename from osal/rk_list.cpp rename to osal/mpp_list.cpp diff --git a/osal/rk_log.cpp b/osal/mpp_log.cpp similarity index 100% rename from osal/rk_log.cpp rename to osal/mpp_log.cpp diff --git a/osal/rk_malloc.cpp b/osal/mpp_malloc.cpp similarity index 93% rename from osal/rk_malloc.cpp rename to osal/mpp_malloc.cpp index ffc82be2..d1084964 100644 --- a/osal/rk_malloc.cpp +++ b/osal/mpp_malloc.cpp @@ -20,6 +20,7 @@ #include "rk_env.h" #include "rk_malloc.h" #include "rk_list.h" +#include "mpp_err.h" #include "os_malloc.h" #include @@ -70,7 +71,7 @@ void *rk_mpp_malloc(char *tag, size_t size) void *ptr; get_osal_mem_flag(); - if (RK_OK == os_malloc(&ptr, RK_OSAL_MEM_ALIGN, size)) { + if (MPP_OK == os_malloc(&ptr, RK_OSAL_MEM_ALIGN, size)) { if (osal_mem_flag & OSAL_MEM_LIST_EN) { struct mem_node *node = (struct mem_node *)malloc(sizeof(struct mem_node)); INIT_LIST_HEAD(&node->list); diff --git a/osal/test/CMakeLists.txt b/osal/test/CMakeLists.txt index 3dff2097..2438deed 100644 --- a/osal/test/CMakeLists.txt +++ b/osal/test/CMakeLists.txt @@ -19,14 +19,14 @@ macro(add_mpp_osal_test module) endmacro() # log system unit test -add_mpp_osal_test(rk_log) +add_mpp_osal_test(mpp_log) # env system unit test -add_mpp_osal_test(rk_env) +add_mpp_osal_test(mpp_env) # malloc system unit test -add_mpp_osal_test(rk_malloc) +add_mpp_osal_test(mpp_malloc) # thread implement unit test -add_mpp_osal_test(rk_thread) +add_mpp_osal_test(mpp_thread) diff --git a/osal/test/rk_env_test.c b/osal/test/mpp_env_test.c similarity index 100% rename from osal/test/rk_env_test.c rename to osal/test/mpp_env_test.c diff --git a/osal/test/rk_log_test.c b/osal/test/mpp_log_test.c similarity index 100% rename from osal/test/rk_log_test.c rename to osal/test/mpp_log_test.c diff --git a/osal/test/rk_malloc_test.c b/osal/test/mpp_malloc_test.c similarity index 100% rename from osal/test/rk_malloc_test.c rename to osal/test/mpp_malloc_test.c diff --git a/osal/test/rk_thread_test.c b/osal/test/mpp_thread_test.c similarity index 100% rename from osal/test/rk_thread_test.c rename to osal/test/mpp_thread_test.c