diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-05 01:56:44 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-05 01:56:44 +0000 |
commit | d1e4881ac3b65fb9486ebc8bc5508ca7ad668eb9 (patch) | |
tree | db72a29ef7fee2f032e9f8b13bef503ca2ec91e7 /nuttx/arch/x86/include | |
parent | d4d884ccde2057574f9846c8a4aad91c68874f81 (diff) | |
download | px4-nuttx-d1e4881ac3b65fb9486ebc8bc5508ca7ad668eb9.tar.gz px4-nuttx-d1e4881ac3b65fb9486ebc8bc5508ca7ad668eb9.tar.bz2 px4-nuttx-d1e4881ac3b65fb9486ebc8bc5508ca7ad668eb9.zip |
Add task init and signal scheduling logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3338 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/x86/include')
-rwxr-xr-x | nuttx/arch/x86/include/i486/irq.h | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/nuttx/arch/x86/include/i486/irq.h b/nuttx/arch/x86/include/i486/irq.h index 7f6d849ba..0ff572df4 100755 --- a/nuttx/arch/x86/include/i486/irq.h +++ b/nuttx/arch/x86/include/i486/irq.h @@ -57,23 +57,25 @@ /* Storage order: %ebx, $esi, %edi, %ebp, sp, and return PC */ #ifdef __ASSEMBLY__ -# define REG_EBX (0*4) -# define REG_ESI (1*4) -# define REG_EDI (2*4) -# define REG_EBP (3*4) -# define REG_SP (4*4) -# define REG_PC (5*4) +# define REG_EBX (0*4) +# define REG_ESI (1*4) +# define REG_EDI (2*4) +# define REG_EBP (3*4) +# define REG_SP (4*4) +# define REG_PC (5*4) +# define REG_FLAGS (6*4) #else -# define REG_EBX (0) -# define REG_ESI (1) -# define REG_EDI (2) -# define REG_EBP (3) -# define REG_SP (4) -# define REG_PC (5) +# define REG_EBX (0) +# define REG_ESI (1) +# define REG_EDI (2) +# define REG_EBP (3) +# define REG_SP (4) +# define REG_PC (5) +# define REG_FLAGS (6) #endif /* __ASSEMBLY__ */ -#define XCPTCONTEXT_REGS (6) -#define XCPTCONTEXT_SIZE (6 * XCPTCONTEXT_REGS) +#define XCPTCONTEXT_REGS (7) +#define XCPTCONTEXT_SIZE (4 * XCPTCONTEXT_REGS) /**************************************************************************** * Public Types @@ -84,9 +86,20 @@ #ifndef __ASSEMBLY__ struct xcptcontext { - void *sigdeliver; /* Actual type is sig_deliver_t */ + /* The following function pointer is non-zero if there are pending signals + * to be processed. + */ - /* Storage order: %ebx, $esi, %edi, %ebp, sp, and return PC */ +#ifndef CONFIG_DISABLE_SIGNALS + void *sigdeliver; /* Actual type is sig_deliver_t */ + + /* These are saved copies of LR and CPSR used during signal processing. */ + + uint32_t saved_pc; + uint32_t saved_flags; +#endif + + /* Register save area */ uint32_t regs[XCPTCONTEXT_REGS]; }; @@ -117,7 +130,7 @@ static inline irqstate_t irqflags() static inline bool irqdisabled(irqstate_t flags) { - return ((flags & X86_FLAGS_IF) == 0); + return ((flags & X86_FLAGS_IF) != 0); } /* Disable interrupts unconditionally */ |