summaryrefslogtreecommitdiff
path: root/components/lwp
diff options
context:
space:
mode:
authorShell <[email protected]>2023-12-22 15:44:45 +0800
committerMeco Man <[email protected]>2024-01-02 19:42:46 +0800
commit3a7903b799c9f379048368df029cac3e42c28be4 (patch)
tree63d7f7cecb462207bcaae6153f2bdf15ee4e5ed4 /components/lwp
parent7c07a974792b0f6dc60375eb54095c903e250091 (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/lwp')
-rw-r--r--components/lwp/lwp.h2
-rw-r--r--components/lwp/lwp_user_mm.c2
2 files changed, 4 insertions, 0 deletions
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)