From 31446eab4c01fc7382ad7cd6363c253852ec1235 Mon Sep 17 00:00:00 2001 From: bernard Date: Sat, 11 Jan 2014 16:33:31 +0800 Subject: [Kernel] application module can support arguments --- include/rtthread.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/rtthread.h') diff --git a/include/rtthread.h b/include/rtthread.h index 0891ed9bcc..7704abf208 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -420,6 +420,7 @@ rt_module_t rt_module_load(const char *name, void *module_ptr); rt_err_t rt_module_unload(rt_module_t module); #ifdef RT_USING_DFS rt_module_t rt_module_open(const char *filename); +rt_module_t rt_module_exec_cmd(const char *path, char* cmd_line, int size); #endif void *rt_module_malloc(rt_size_t size); void *rt_module_realloc(void *ptr, rt_size_t size); -- cgit v1.3.1 From 86cdc22043d4f765aa2ad289fac09aca518fe525 Mon Sep 17 00:00:00 2001 From: prife Date: Sat, 11 Jan 2014 16:37:13 +0800 Subject: kernel: rearrange the header file include order There are some CONFIG OPTIONS in rtdebug.h, which may influence the rtdef.h, so rtdebug.h should be head of the rtdef.h --- include/rtdebug.h | 4 +--- include/rtdef.h | 2 -- include/rtthread.h | 3 ++- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'include/rtthread.h') diff --git a/include/rtdebug.h b/include/rtdebug.h index 6ef04f6bf9..2d93e88b94 100644 --- a/include/rtdebug.h +++ b/include/rtdebug.h @@ -21,8 +21,6 @@ #ifndef __RTDEBUG_H__ #define __RTDEBUG_H__ -#include - /* Using this macro to control all kernel debug features. */ #ifdef RT_DEBUG @@ -64,7 +62,7 @@ #endif #ifndef RT_DEBUG_INIT -#define RT_DEBUG_INIT 0 +#define RT_DEBUG_INIT 0 #endif /* Turn on this to enable context check */ diff --git a/include/rtdef.h b/include/rtdef.h index e21bc4eb41..f5b59fa7e8 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -34,8 +34,6 @@ #ifndef __RT_DEF_H__ #define __RT_DEF_H__ -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/include/rtthread.h b/include/rtthread.h index 0891ed9bcc..f201f3d9d7 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -31,8 +31,9 @@ #ifndef __RT_THREAD_H__ #define __RT_THREAD_H__ -#include +#include #include +#include #include #include -- cgit v1.3.1 From dbcb4a1ccff7c3840a722110d7a98816c0dd5cf2 Mon Sep 17 00:00:00 2001 From: bernard Date: Tue, 11 Mar 2014 15:44:35 +0800 Subject: [Kernel] declare more APIs in module --- include/rtthread.h | 3 +++ src/module.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include/rtthread.h') diff --git a/include/rtthread.h b/include/rtthread.h index f53c7b95b8..abe3a614ed 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -434,6 +434,9 @@ void rt_module_load_sethook(void (*hook)(rt_module_t module)); void rt_module_unload_sethook(void (*hook)(rt_module_t module)); #endif +void rt_module_init_object_container(struct rt_module *module); +rt_err_t rt_module_destroy(rt_module_t module); + /*@}*/ #endif diff --git a/src/module.c b/src/module.c index ec5ed3f7d0..428d42e961 100644 --- a/src/module.c +++ b/src/module.c @@ -242,7 +242,7 @@ static int rt_module_arm_relocate(struct rt_module *module, return 0; } -static void rt_module_init_object_container(struct rt_module *module) +void rt_module_init_object_container(struct rt_module *module) { RT_ASSERT(module != RT_NULL); -- cgit v1.3.1