diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-28 08:41:57 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-28 08:41:57 -0600 |
commit | bdb25bba2e972cea6f46f0a5a3c760153549c2e1 (patch) | |
tree | 895de0151eb8125077f4ed76839ef7b242b350d6 | |
parent | 8840883bda397389b96654b3637f8549fd7af226 (diff) | |
download | nuttx-bdb25bba2e972cea6f46f0a5a3c760153549c2e1.tar.gz nuttx-bdb25bba2e972cea6f46f0a5a3c760153549c2e1.tar.bz2 nuttx-bdb25bba2e972cea6f46f0a5a3c760153549c2e1.zip |
Fix an error introduced into ALL implmentations of interrupt dispatch logic
-rw-r--r-- | nuttx/arch/arm/src/arm/up_doirq.c | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/armv7-a/arm_doirq.c | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/dm320/dm320_decodeirq.c | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/imx/imx_decodeirq.c | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c | 3 | ||||
-rw-r--r-- | nuttx/arch/avr/src/avr32/up_doirq.c | 2 | ||||
-rw-r--r-- | nuttx/arch/hc/src/common/up_doirq.c | 2 | ||||
-rw-r--r-- | nuttx/arch/mips/src/mips32/up_doirq.c | 2 | ||||
-rw-r--r-- | nuttx/arch/mips/src/pic32mx/pic32mx-decodeirq.c | 2 | ||||
-rw-r--r-- | nuttx/arch/sh/src/common/up_doirq.c | 2 | ||||
-rw-r--r-- | nuttx/arch/x86/src/qemu/qemu_handlers.c | 2 | ||||
-rw-r--r-- | nuttx/arch/z80/src/common/up_doirq.c | 2 | ||||
-rw-r--r-- | nuttx/sched/group/group_addrenv.c | 10 |
13 files changed, 22 insertions, 13 deletions
diff --git a/nuttx/arch/arm/src/arm/up_doirq.c b/nuttx/arch/arm/src/arm/up_doirq.c index 4e8c5caa4..68c4c4022 100644 --- a/nuttx/arch/arm/src/arm/up_doirq.c +++ b/nuttx/arch/arm/src/arm/up_doirq.c @@ -118,7 +118,7 @@ void up_doirq(int irq, uint32_t *regs) * thread at the head of the ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); #endif } #endif diff --git a/nuttx/arch/arm/src/armv7-a/arm_doirq.c b/nuttx/arch/arm/src/armv7-a/arm_doirq.c index eadfce76c..ce175d7c1 100644 --- a/nuttx/arch/arm/src/armv7-a/arm_doirq.c +++ b/nuttx/arch/arm/src/armv7-a/arm_doirq.c @@ -118,7 +118,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs) * thread at the head of the ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); #endif } #endif diff --git a/nuttx/arch/arm/src/dm320/dm320_decodeirq.c b/nuttx/arch/arm/src/dm320/dm320_decodeirq.c index 710a3e336..7616fe918 100644 --- a/nuttx/arch/arm/src/dm320/dm320_decodeirq.c +++ b/nuttx/arch/arm/src/dm320/dm320_decodeirq.c @@ -134,7 +134,7 @@ void up_decodeirq(uint32_t* regs) * thread at the head of the ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); #endif } #endif diff --git a/nuttx/arch/arm/src/imx/imx_decodeirq.c b/nuttx/arch/arm/src/imx/imx_decodeirq.c index 588795068..e241ae393 100644 --- a/nuttx/arch/arm/src/imx/imx_decodeirq.c +++ b/nuttx/arch/arm/src/imx/imx_decodeirq.c @@ -141,7 +141,7 @@ void up_decodeirq(uint32_t* regs) * thread at the head of the ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); #endif } #endif diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c b/nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c index 28aa2a131..355f13af3 100644 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c @@ -1,6 +1,5 @@ /******************************************************************************** * arch/arm/src/lpc31xx/lpc31_decodeirq.c - * arch/arm/src/chip/lpc31_decodeirq.c * * Copyright (C) 2009, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -142,7 +141,7 @@ void up_decodeirq(uint32_t *regs) * thread at the head of the ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); #endif } #endif diff --git a/nuttx/arch/avr/src/avr32/up_doirq.c b/nuttx/arch/avr/src/avr32/up_doirq.c index f7e7a759f..242c86289 100644 --- a/nuttx/arch/avr/src/avr32/up_doirq.c +++ b/nuttx/arch/avr/src/avr32/up_doirq.c @@ -113,7 +113,7 @@ uint32_t *up_doirq(int irq, uint32_t *regs) * thread at the head of the ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); #endif } #endif diff --git a/nuttx/arch/hc/src/common/up_doirq.c b/nuttx/arch/hc/src/common/up_doirq.c index 047b04508..3ddedf27a 100644 --- a/nuttx/arch/hc/src/common/up_doirq.c +++ b/nuttx/arch/hc/src/common/up_doirq.c @@ -113,7 +113,7 @@ uint8_t *up_doirq(int irq, uint8_t *regs) * thread at the head of the ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); #endif } #endif diff --git a/nuttx/arch/mips/src/mips32/up_doirq.c b/nuttx/arch/mips/src/mips32/up_doirq.c index 6abba7d75..b5ca41974 100644 --- a/nuttx/arch/mips/src/mips32/up_doirq.c +++ b/nuttx/arch/mips/src/mips32/up_doirq.c @@ -119,7 +119,7 @@ uint32_t *up_doirq(int irq, uint32_t *regs) * thread at the head of the ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); #endif } #endif diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-decodeirq.c b/nuttx/arch/mips/src/pic32mx/pic32mx-decodeirq.c index 650e6851c..661e4c6c1 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-decodeirq.c +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-decodeirq.c @@ -170,7 +170,7 @@ uint32_t *pic32mx_decodeirq(uint32_t *regs) * thread at the head of the ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); #endif } #endif diff --git a/nuttx/arch/sh/src/common/up_doirq.c b/nuttx/arch/sh/src/common/up_doirq.c index ca6c6ee59..ec165dcd0 100644 --- a/nuttx/arch/sh/src/common/up_doirq.c +++ b/nuttx/arch/sh/src/common/up_doirq.c @@ -121,7 +121,7 @@ uint32_t *up_doirq(int irq, uint32_t* regs) * thread at the head of the ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); #endif } #endif diff --git a/nuttx/arch/x86/src/qemu/qemu_handlers.c b/nuttx/arch/x86/src/qemu/qemu_handlers.c index ddccfa359..1c7ba1fb8 100644 --- a/nuttx/arch/x86/src/qemu/qemu_handlers.c +++ b/nuttx/arch/x86/src/qemu/qemu_handlers.c @@ -125,7 +125,7 @@ static uint32_t *common_handler(int irq, uint32_t *regs) * thread at the head of the ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); #endif } #endif diff --git a/nuttx/arch/z80/src/common/up_doirq.c b/nuttx/arch/z80/src/common/up_doirq.c index ab974c88a..caa03ea9a 100644 --- a/nuttx/arch/z80/src/common/up_doirq.c +++ b/nuttx/arch/z80/src/common/up_doirq.c @@ -112,7 +112,7 @@ FAR chipreg_t *up_doirq(uint8_t irq, FAR chipreg_t *regs) * ready-to-run list. */ - (void)group_addrenv(rtcb); + (void)group_addrenv(NULL); } regs = newregs; diff --git a/nuttx/sched/group/group_addrenv.c b/nuttx/sched/group/group_addrenv.c index 35dcab9ca..f70fbf64c 100644 --- a/nuttx/sched/group/group_addrenv.c +++ b/nuttx/sched/group/group_addrenv.c @@ -43,6 +43,7 @@ #include <nuttx/sched.h> +#include "sched/sched.h" #include "group/group.h" #ifdef CONFIG_ARCH_ADDRENV @@ -107,6 +108,15 @@ int group_addrenv(FAR struct tcb_s *tcb) gid_t gid; int ret; + /* NULL for the tcb means to use the TCB of the task at the head of the + * ready to run list. + */ + + if (!tcb) + { + tcb = (FAR struct tcb_s *)g_readytorun.head; + } + DEBUGASSERT(tcb && tcb->group); group = tcb->group; |