[Kernel] application module can support arguments

This commit is contained in:
bernard
2014-01-11 16:33:31 +08:00
parent c07a78ae00
commit 31446eab4c
5 changed files with 304 additions and 45 deletions
+8 -7
View File
@@ -952,10 +952,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 +965,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];
+1
View File
@@ -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);