mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 10:36:04 +08:00
[kernel] Add hook for malloc services
Including the patch for memory allocation, testsuites and fixups of static analysis. Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user