summaryrefslogtreecommitdiff
path: root/nuttx/arch/pjrc-8051/src/up_exit.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-19 14:22:43 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-19 14:22:43 +0000
commitbf14d0a7cfb1c59f692cd24d9e97699b01e103b4 (patch)
treec94333bd8c43f9af9dcf280bf2eb76e1cf071765 /nuttx/arch/pjrc-8051/src/up_exit.c
parent35aaf2d6d6776ea47729eb80efb15e04671ab316 (diff)
downloadpx4-nuttx-bf14d0a7cfb1c59f692cd24d9e97699b01e103b4.tar.gz
px4-nuttx-bf14d0a7cfb1c59f692cd24d9e97699b01e103b4.tar.bz2
px4-nuttx-bf14d0a7cfb1c59f692cd24d9e97699b01e103b4.zip
Interrupts must be disabled in all low level context switches
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@89 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/pjrc-8051/src/up_exit.c')
-rw-r--r--nuttx/arch/pjrc-8051/src/up_exit.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nuttx/arch/pjrc-8051/src/up_exit.c b/nuttx/arch/pjrc-8051/src/up_exit.c
index 5a98496a6..a9b641bab 100644
--- a/nuttx/arch/pjrc-8051/src/up_exit.c
+++ b/nuttx/arch/pjrc-8051/src/up_exit.c
@@ -41,6 +41,7 @@
#include <sys/types.h>
#include <sched.h>
#include <debug.h>
+#include <8052.h>
#include <nuttx/arch.h>
#include "os_internal.h"
#include "up_internal.h"
@@ -76,6 +77,12 @@ void _exit(int status)
dbg("TCB=%p exitting\n", tcb);
+ /* Disable interrupts. Interrupts will remain disabled until
+ * the new task is resumed below when the save IE is restored.
+ */
+
+ EA = 0;
+
/* Remove the tcb task from the ready-to-run list. We can
* ignore the return value because we know that a context
* switch is needed.