diff options
| author | Shell <[email protected]> | 2023-12-22 15:44:45 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2024-01-02 19:42:46 +0800 |
| commit | 3a7903b799c9f379048368df029cac3e42c28be4 (patch) | |
| tree | 63d7f7cecb462207bcaae6153f2bdf15ee4e5ed4 /components | |
| parent | 7c07a974792b0f6dc60375eb54095c903e250091 (diff) | |
[kernel] Add hook for malloc services
Including the patch for memory allocation, testsuites and fixups of
static analysis.
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'components')
| -rw-r--r-- | components/finsh/msh.c | 9 | ||||
| -rw-r--r-- | components/lwp/lwp.h | 2 | ||||
| -rw-r--r-- | components/lwp/lwp_user_mm.c | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/components/finsh/msh.c b/components/finsh/msh.c index 09fc30def8..319db5667b 100644 --- a/components/finsh/msh.c +++ b/components/finsh/msh.c @@ -53,7 +53,7 @@ int msh_help(int argc, char **argv) return 0; } -MSH_CMD_EXPORT_ALIAS(msh_help, help, RT-Thread shell help.); +MSH_CMD_EXPORT_ALIAS(msh_help, help, RT-Thread shell help); #ifdef MSH_USING_BUILT_IN_COMMANDS int cmd_ps(int argc, char **argv) @@ -69,7 +69,7 @@ int cmd_ps(int argc, char **argv) list_thread(); return 0; } -MSH_CMD_EXPORT_ALIAS(cmd_ps, ps, List threads in the system.); +MSH_CMD_EXPORT_ALIAS(cmd_ps, ps, List threads in the system); #ifdef RT_USING_HEAP int cmd_free(int argc, char **argv) @@ -88,7 +88,7 @@ int cmd_free(int argc, char **argv) #endif return 0; } -MSH_CMD_EXPORT_ALIAS(cmd_free, free, Show the memory usage in the system.); +MSH_CMD_EXPORT_ALIAS(cmd_free, free, Show the memory usage in the system); #endif /* RT_USING_HEAP */ #endif /* MSH_USING_BUILT_IN_COMMANDS */ @@ -296,8 +296,7 @@ static int _msh_exec_cmd(char *cmd, rt_size_t length, int *retp) } #if defined(RT_USING_SMART) && defined(DFS_USING_POSIX) -pid_t exec(char*, int, int, char**); - +#include <lwp.h> /* check whether a file of the given path exits */ static rt_bool_t _msh_lwp_cmd_exists(const char *path) { diff --git a/components/lwp/lwp.h b/components/lwp/lwp.h index 20ac68eedb..8281cb5426 100644 --- a/components/lwp/lwp.h +++ b/components/lwp/lwp.h @@ -208,6 +208,8 @@ void lwp_uthread_ctx_restore(void); int lwp_setaffinity(pid_t pid, int cpu); +pid_t exec(char *filename, int debug, int argc, char **argv); + /* ctime lwp API */ int timer_list_free(rt_list_t *timer_list); diff --git a/components/lwp/lwp_user_mm.c b/components/lwp/lwp_user_mm.c index eb58c76f39..3c23e59e05 100644 --- a/components/lwp/lwp_user_mm.c +++ b/components/lwp/lwp_user_mm.c @@ -148,7 +148,9 @@ void lwp_aspace_switch(struct rt_thread *thread) aspace = lwp->aspace; } else + { aspace = &rt_kernel_space; + } from_tbl = rt_hw_mmu_tbl_get(); if (aspace->page_table != from_tbl) |
