diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/rtdebug.h | 2 | ||||
| -rw-r--r-- | include/rtdef.h | 16 | ||||
| -rw-r--r-- | include/rtthread.h | 7 |
3 files changed, 16 insertions, 9 deletions
diff --git a/include/rtdebug.h b/include/rtdebug.h index 6ef04f6bf9..8fd07b5b76 100644 --- a/include/rtdebug.h +++ b/include/rtdebug.h @@ -64,7 +64,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 2851dcee51..2d1ea4dfd2 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -34,6 +34,7 @@ #ifndef __RT_DEF_H__ #define __RT_DEF_H__ +/* include rtconfig header to import configuration */ #include <rtconfig.h> #ifdef __cplusplus @@ -952,10 +953,11 @@ struct rt_module rt_uint8_t *module_space; /**< module memory space */ - void *module_entry; /**< entry address of module's thread */ - rt_thread_t module_thread; /**< stack size of module's thread */ - rt_uint32_t stack_size; /**< priority of module's thread */ - rt_uint32_t thread_priority; + void *module_entry; /**< the entry address of module */ + rt_thread_t module_thread; /**< the main thread of module */ + + rt_uint8_t* module_cmd_line; /**< module command line */ + rt_uint32_t module_cmd_size; /**< the size of module command line */ #ifdef RT_USING_SLAB /* module memory allocator */ @@ -964,10 +966,10 @@ struct rt_module rt_uint32_t page_cnt; /**< module's using pages count */ #endif - rt_uint32_t nsym; /**< number of symbol in the module */ - struct rt_module_symtab *symtab; /**< module symbol table */ + rt_uint16_t nref; /**< reference count */ - rt_uint32_t nref; /**< reference count */ + rt_uint16_t nsym; /**< number of symbol in the module */ + struct rt_module_symtab *symtab; /**< module symbol table */ /* object in this module, module object is the last basic object type */ struct rt_object_information module_object[RT_Object_Class_Unknown]; diff --git a/include/rtthread.h b/include/rtthread.h index 0891ed9bcc..abe3a614ed 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -31,8 +31,9 @@ #ifndef __RT_THREAD_H__ #define __RT_THREAD_H__ -#include <rtdef.h> +#include <rtconfig.h> #include <rtdebug.h> +#include <rtdef.h> #include <rtservice.h> #include <rtm.h> @@ -420,6 +421,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); @@ -432,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 |
