diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-05-13 19:53:16 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-05-13 19:53:16 +0000 |
commit | 2fc7c368483da2c5a2310734447dcf299915aff9 (patch) | |
tree | 18f03d45459ca8c2d2d72a05400ec33c291ca384 /nuttx/arch/arm/src/lm3s/lm3s_irq.c | |
parent | d85a6b5e74dbbf82ef5ed1518d9c588356a11251 (diff) | |
download | px4-nuttx-2fc7c368483da2c5a2310734447dcf299915aff9.tar.gz px4-nuttx-2fc7c368483da2c5a2310734447dcf299915aff9.tar.bz2 px4-nuttx-2fc7c368483da2c5a2310734447dcf299915aff9.zip |
Add basic context switching logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1777 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lm3s/lm3s_irq.c')
-rw-r--r-- | nuttx/arch/arm/src/lm3s/lm3s_irq.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/nuttx/arch/arm/src/lm3s/lm3s_irq.c b/nuttx/arch/arm/src/lm3s/lm3s_irq.c index 04110e3cf..4b3c404e0 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_irq.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_irq.c @@ -173,6 +173,12 @@ void up_irqinitialize(void) current_regs = NULL; + /* Attach the PendSV exception handler. This is used for performing + * context switches. + */ + + irq_attach(LMSB_IRQ_PENDSV, lm3s_pendsv); + /* Attach all processor exceptions (except reset and sys tick) */ #ifdef CONFIG_DEBUG @@ -183,7 +189,6 @@ void up_irqinitialize(void) irq_attach(LMSB_IRQ_USAGEFAULT, lm3s_usagefault); irq_attach(LMSB_IRQ_SVCALL, lm3s_svcall); irq_attach(LMSB_IRQ_DBGMONITOR, lm3s_dbgmonitor); - irq_attach(LMSB_IRQ_PENDSV, lm3s_pendsv); irq_attach(LMSB_IRQ_RESERVED, lm3s_reserved); #endif @@ -368,14 +373,6 @@ int lm3s_dbgmonitor(int irq, FAR void *context) return 0; } -int lm3s_pendsv(int irq, FAR void *context) -{ - (void)irqsave(); - dbg("PANIC!!! PendSV received\n"); - PANIC(OSERR_UNEXPECTEDISR); - return 0; -} - int lm3s_reserved(int irq, FAR void *context) { (void)irqsave(); |