summaryrefslogtreecommitdiff
path: root/libcpu/ia32/stack.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-05-28 16:20:08 +0800
committerGitHub <[email protected]>2021-05-28 16:20:08 +0800
commit92beddf3bccf6346e26aa097f82464456fb8e6bd (patch)
tree197e4a108118dda016ea02274172f0c40e7ee8ed /libcpu/ia32/stack.c
parentb18a99b44240ec3152011e159cc24a5af8dff0ce (diff)
parent03f4d40e30f3c94e1db0b3a65b3610dee695694a (diff)
Merge pull request #4737 from mysterywolf/3,1,xformatv3.1.5
[lts 3.1.x] format codes
Diffstat (limited to 'libcpu/ia32/stack.c')
-rw-r--r--libcpu/ia32/stack.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/libcpu/ia32/stack.c b/libcpu/ia32/stack.c
index 9d656a73d6..a533b94076 100644
--- a/libcpu/ia32/stack.c
+++ b/libcpu/ia32/stack.c
@@ -10,7 +10,7 @@
* Change Logs:
* Date Author Notes
*/
-
+
#include <rtthread.h>
#include <i386.h>
@@ -24,36 +24,36 @@
* This function will initialize thread stack
*
* @param tentry the entry of thread
- * @param parameter the parameter of entry
+ * @param parameter the parameter of entry
* @param stack_addr the beginning stack address
* @param texit the function will be called when thread exit
*
* @return stack address
*/
rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter,
- rt_uint8_t *stack_addr, void *texit)
+ rt_uint8_t *stack_addr, void *texit)
{
- unsigned long *stk;
+ unsigned long *stk;
- stk = (unsigned long *)stack_addr;
- *(--stk) = (unsigned long)parameter;
- *(--stk) = (unsigned long)texit;
- *(--stk) = 0x200; /*flags*/
- *(--stk) = 0x08; /*cs*/
- *(--stk) = (unsigned long)tentry; /*eip*/
- *(--stk) = 0; /*irqno*/
- *(--stk) = 0x10; /*ds*/
- *(--stk) = 0x10; /*es*/
- *(--stk) = 0; /*eax*/
- *(--stk) = 0; /*ecx*/
- *(--stk) = 0; /*edx*/
- *(--stk) = 0; /*ebx*/
- *(--stk) = 0; /*esp*/
- *(--stk) = 0; /*ebp*/
- *(--stk) = 0; /*esi*/
- *(--stk) = 0; /*edi*/
+ stk = (unsigned long *)stack_addr;
+ *(--stk) = (unsigned long)parameter;
+ *(--stk) = (unsigned long)texit;
+ *(--stk) = 0x200; /*flags*/
+ *(--stk) = 0x08; /*cs*/
+ *(--stk) = (unsigned long)tentry; /*eip*/
+ *(--stk) = 0; /*irqno*/
+ *(--stk) = 0x10; /*ds*/
+ *(--stk) = 0x10; /*es*/
+ *(--stk) = 0; /*eax*/
+ *(--stk) = 0; /*ecx*/
+ *(--stk) = 0; /*edx*/
+ *(--stk) = 0; /*ebx*/
+ *(--stk) = 0; /*esp*/
+ *(--stk) = 0; /*ebp*/
+ *(--stk) = 0; /*esi*/
+ *(--stk) = 0; /*edi*/
- /* return task's current stack address */
- return (rt_uint8_t *)stk;
+ /* return task's current stack address */
+ return (rt_uint8_t *)stk;
}
/*@}*/