summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbernard <[email protected]>2014-01-11 16:33:31 +0800
committerbernard <[email protected]>2014-01-11 16:33:31 +0800
commit31446eab4c01fc7382ad7cd6363c253852ec1235 (patch)
tree674f5733dcdf173b9bb30bef64e3ba7219298ea2 /include
parentc07a78ae005b9e41801f1d7f8e90a37d4d7f4449 (diff)
[Kernel] application module can support arguments
Diffstat (limited to 'include')
-rw-r--r--include/rtdef.h15
-rw-r--r--include/rtthread.h1
2 files changed, 9 insertions, 7 deletions
diff --git a/include/rtdef.h b/include/rtdef.h
index e21bc4eb41..3c91ae7d8d 100644
--- a/include/rtdef.h
+++ b/include/rtdef.h
@@ -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];
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);