diff options
| author | Bernard Xiong <[email protected]> | 2018-06-11 16:49:52 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-06-11 16:49:52 +0800 |
| commit | 22d5e3c3a9d7520b0432e5d8ce2775685e0952d9 (patch) | |
| tree | 218a61f84fe19ae3c87f7d966231c12ec83127ef | |
| parent | 42f2c1cb0568b72315bc7fe650c9d8bf307b8d21 (diff) | |
| parent | e1be777adc7dc3076bb49edfd527d3f501f3d874 (diff) | |
Merge pull request #1523 from heyuanjie87/lwp
Lwp
| -rw-r--r-- | components/lwp/lwp.c | 10 | ||||
| -rw-r--r-- | components/lwp/lwp_mem.c | 3 |
2 files changed, 1 insertions, 12 deletions
diff --git a/components/lwp/lwp.c b/components/lwp/lwp.c index 6837e30b53..13e2a8f2ef 100644 --- a/components/lwp/lwp.c +++ b/components/lwp/lwp.c @@ -352,13 +352,3 @@ int exec(char *filename) return -RT_ERROR; } -FINSH_FUNCTION_EXPORT(exec, loader a user app &run); - -int _exec(int argc, char **argv) -{ - if (argc != 2) - return -RT_ERROR; - - return exec(argv[1]); -} -MSH_CMD_EXPORT_ALIAS(_exec, exec, loader a user app &run); diff --git a/components/lwp/lwp_mem.c b/components/lwp/lwp_mem.c index 95c95441b8..ca390e4f96 100644 --- a/components/lwp/lwp_mem.c +++ b/components/lwp/lwp_mem.c @@ -22,7 +22,6 @@ * 2018-03-24 Tanek the first version */ -#include <stdio.h> #include <rtthread.h> #include <lwp.h> @@ -77,7 +76,7 @@ static void *rt_lwp_malloc_page(struct rt_lwp *lwp, rt_size_t npages) dbg_log(DBG_LOG, "lwp alloc page: %d\n", npages); - sprintf(name, "lwp%02x", lwp->heap_cnt); + rt_sprintf(name, "lwp%02x", lwp->heap_cnt); rt_lwp_memheap_init(lwp_heap, name, chunk, npages * LWP_MEM_PAGE_SIZE); rt_list_insert_before(&lwp->hlist, &lwp_heap->mlist); |
