sim: change the type of xcpt_reg_t
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
This commit is contained in:
parent
2f512f78bf
commit
835aac23b7
@ -27,6 +27,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -156,7 +157,7 @@
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
typedef unsigned long xcpt_reg_t;
|
||||
typedef size_t xcpt_reg_t;
|
||||
typedef xcpt_reg_t jmp_buf[XCPTCONTEXT_REGS];
|
||||
|
||||
#endif
|
||||
|
@ -41,7 +41,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void sim_copyfullstate(unsigned long *dest, unsigned long *src)
|
||||
void sim_copyfullstate(xcpt_reg_t *dest, xcpt_reg_t *src)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -99,7 +99,7 @@ pid_t sim_fork(const xcpt_reg_t *context)
|
||||
xcpt_reg_t stackutil;
|
||||
|
||||
sinfo("fork context [%p]:\n", context);
|
||||
sinfo(" frame pointer:%lx sp:%lx pc:%lx\n",
|
||||
sinfo(" frame pointer:%zx sp:%zx pc:%zx\n",
|
||||
context[JB_FP], context[JB_SP], context[JB_PC]);
|
||||
|
||||
/* Allocate and initialize a TCB for the child task. */
|
||||
@ -124,7 +124,7 @@ pid_t sim_fork(const xcpt_reg_t *context)
|
||||
DEBUGASSERT(stacktop > context[JB_SP]);
|
||||
stackutil = stacktop - context[JB_SP];
|
||||
|
||||
sinfo("Parent: stackutil:%lu\n", stackutil);
|
||||
sinfo("Parent: stackutil:%zu\n", stackutil);
|
||||
|
||||
/* Make some feeble effort to preserve the stack contents. This is
|
||||
* feeble because the stack surely contains invalid pointers and other
|
||||
@ -152,9 +152,9 @@ pid_t sim_fork(const xcpt_reg_t *context)
|
||||
newfp = context[JB_FP];
|
||||
}
|
||||
|
||||
sinfo("Old stack top:%lx SP:%lx FP:%lx\n",
|
||||
sinfo("Old stack top:%zx SP:%zx FP:%zx\n",
|
||||
stacktop, context[JB_SP], context[JB_FP]);
|
||||
sinfo("New stack top:%lx SP:%lx FP:%lx\n",
|
||||
sinfo("New stack top:%zx SP:%zx FP:%zx\n",
|
||||
newtop, newsp, newfp);
|
||||
|
||||
/* Update the stack pointer, frame pointer, and volatile registers. When
|
||||
|
@ -180,6 +180,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
typedef int pid_t;
|
||||
typedef size_t xcpt_reg_t;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Type Definitions
|
||||
@ -203,7 +204,7 @@ extern char **g_argv;
|
||||
|
||||
/* Context switching */
|
||||
|
||||
void sim_copyfullstate(unsigned long *dest, unsigned long *src);
|
||||
void sim_copyfullstate(xcpt_reg_t *dest, xcpt_reg_t *src);
|
||||
void *sim_doirq(int irq, void *regs);
|
||||
|
||||
/* sim_hostmisc.c ***********************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user