summaryrefslogtreecommitdiff
path: root/nuttx/arch/pjrc-8051
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-02 23:34:42 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-02 23:34:42 +0000
commitf08661df96e68eb5f538d5488466b99a7a4bc93e (patch)
tree09cb3c46c963fc98cb1c58b448a9264972b62e27 /nuttx/arch/pjrc-8051
parent4dce3ece605863986f69cad49477441805882ddd (diff)
downloadpx4-nuttx-f08661df96e68eb5f538d5488466b99a7a4bc93e.tar.gz
px4-nuttx-f08661df96e68eb5f538d5488466b99a7a4bc93e.tar.bz2
px4-nuttx-f08661df96e68eb5f538d5488466b99a7a4bc93e.zip
Fix stack addressing
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@33 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/pjrc-8051')
-rw-r--r--nuttx/arch/pjrc-8051/src/up_restorecontext.c12
-rw-r--r--nuttx/arch/pjrc-8051/src/up_savecontext.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/nuttx/arch/pjrc-8051/src/up_restorecontext.c b/nuttx/arch/pjrc-8051/src/up_restorecontext.c
index 429b95445..98b4d0bb4 100644
--- a/nuttx/arch/pjrc-8051/src/up_restorecontext.c
+++ b/nuttx/arch/pjrc-8051/src/up_restorecontext.c
@@ -134,9 +134,9 @@ static void up_popcontext(ubyte newsp) __naked
void up_restorecontext(FAR struct xcptcontext *context)
{
- int nbytes = context->nbytes;
- FAR ubyte *src = context->stack;
- FAR ubyte *dest = (FAR ubyte*)STACK_BASE;
+ int nbytes = context->nbytes;
+ FAR ubyte *src = context->stack;
+ NEAR ubyte *dest = (NEAR ubyte*)STACK_BASE;
/* Interrupts should be disabled for the following. up_popcontext() will
* set the new interrupt state correctly.
@@ -179,9 +179,9 @@ void up_restorestack(FAR struct xcptcontext *context)
* context) from internal RAM to XRAM.
*/
- ubyte nbytes = context->nbytes;
- FAR ubyte *src = context->stack;
- FAR ubyte *dest = (FAR ubyte*)STACK_BASE;
+ ubyte nbytes = context->nbytes;
+ FAR ubyte *src = context->stack;
+ NEAR ubyte *dest = (NEAR ubyte*)STACK_BASE;
while (nbytes--)
{
diff --git a/nuttx/arch/pjrc-8051/src/up_savecontext.c b/nuttx/arch/pjrc-8051/src/up_savecontext.c
index b8b796f07..1eb24b704 100644
--- a/nuttx/arch/pjrc-8051/src/up_savecontext.c
+++ b/nuttx/arch/pjrc-8051/src/up_savecontext.c
@@ -142,9 +142,9 @@ ubyte up_savecontext(FAR struct xcptcontext *context)
* context) from internal RAM to XRAM.
*/
- ubyte nbytes = sp - (STACK_BASE-1);
- FAR ubyte *src = (FAR ubyte*)STACK_BASE;
- FAR ubyte *dest = context->stack;
+ ubyte nbytes = sp - (STACK_BASE-1);
+ NEAR ubyte *src = (NEAR ubyte*)STACK_BASE;
+ FAR ubyte *dest = context->stack;
/* Then copy the stack info into the context structure */
@@ -191,9 +191,9 @@ void up_savestack(FAR struct xcptcontext *context)
* context) from internal RAM to XRAM.
*/
- ubyte nbytes = g_irqtos - (STACK_BASE-1);
- FAR ubyte *src = (FAR ubyte*)STACK_BASE;
- FAR ubyte *dest = context->stack;
+ ubyte nbytes = g_irqtos - (STACK_BASE-1);
+ NEAR ubyte *src = (NEAR ubyte*)STACK_BASE;
+ FAR ubyte *dest = context->stack;
context->nbytes = nbytes;
while (nbytes--)