summaryrefslogtreecommitdiff
path: root/common_modules/module_manager/src
diff options
context:
space:
mode:
authoryajunxiaMS <[email protected]>2023-08-07 17:35:31 +0800
committerGitHub <[email protected]>2023-08-07 17:35:31 +0800
commitbc8bed494d3a37eea022c1385008bdab991f3370 (patch)
tree5b5cc1fae04903078dd0e8a23623d6f8111dafb5 /common_modules/module_manager/src
parent7fa087d061e0422f6d149ce358e5025b590f8fb2 (diff)
Added thumb mode support under IAR for module manager on Cortex-A7 pl… (#289)
* Added thumb mode support under IAR for module manager on Cortex-A7 platform. * update code for comments.
Diffstat (limited to 'common_modules/module_manager/src')
-rw-r--r--common_modules/module_manager/src/txm_module_manager_thread_create.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/common_modules/module_manager/src/txm_module_manager_thread_create.c b/common_modules/module_manager/src/txm_module_manager_thread_create.c
index 2f50cfd7..0ff76936 100644
--- a/common_modules/module_manager/src/txm_module_manager_thread_create.c
+++ b/common_modules/module_manager/src/txm_module_manager_thread_create.c
@@ -94,9 +94,11 @@
/* 03-08-2023 Scott Larson Check module stack for */
/* overlap, */
/* resulting in version 6.2.1 */
-/* xx-xx-xxxx Xiuwen Cai Modified comment(s), */
+/* xx-xx-xxxx Xiuwen Cai, Yajun xia Modified comment(s), */
/* added option for random */
/* number stack filling, */
+/* fixed the kernel stack */
+/* allocation issue, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
@@ -327,9 +329,8 @@ ULONG i;
/* Initialize thread control block to all zeros. */
TX_MEMSET(thread_ptr, 0, sizeof(TX_THREAD));
-#if TXM_MODULE_MEMORY_PROTECTION
- /* If this is a memory protected module, allocate a kernel stack. */
- if((module_instance -> txm_module_instance_property_flags) & TXM_MODULE_MEMORY_PROTECTION)
+ /* If the thread runs on user mode, allocate the kernel stack for syscall. */
+ if((module_instance -> txm_module_instance_property_flags) & TXM_MODULE_USER_MODE)
{
ULONG status;
@@ -354,6 +355,7 @@ ULONG i;
thread_ptr -> tx_thread_module_kernel_stack_size = TXM_MODULE_KERNEL_STACK_SIZE;
}
+#if TXM_MODULE_MEMORY_PROTECTION
/* Place the stack parameters into the thread's control block. */
thread_ptr -> tx_thread_module_stack_start = stack_start;
thread_ptr -> tx_thread_module_stack_size = stack_size;