瀏覽代碼

Merge pull request #1523 from heyuanjie87/lwp

Lwp
Bernard Xiong 7 年之前
父節點
當前提交
22d5e3c3a9
共有 2 個文件被更改,包括 1 次插入12 次删除
  1. 0 10
      components/lwp/lwp.c
  2. 1 2
      components/lwp/lwp_mem.c

+ 0 - 10
components/lwp/lwp.c

@@ -352,13 +352,3 @@ int exec(char *filename)
 
 
     return -RT_ERROR;
     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);

+ 1 - 2
components/lwp/lwp_mem.c

@@ -22,7 +22,6 @@
  * 2018-03-24     Tanek        the first version
  * 2018-03-24     Tanek        the first version
  */
  */
 
 
-#include <stdio.h>
 #include <rtthread.h>
 #include <rtthread.h>
 #include <lwp.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);
     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_lwp_memheap_init(lwp_heap, name, chunk, npages * LWP_MEM_PAGE_SIZE);
 
 
     rt_list_insert_before(&lwp->hlist, &lwp_heap->mlist);
     rt_list_insert_before(&lwp->hlist, &lwp_heap->mlist);