diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-08 18:42:26 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-08 18:42:26 +0000 |
commit | 47ebc42ac1eebdd9b33d22adfd91c56b50016ef9 (patch) | |
tree | ebe748f797b72d262a970379d945a8546a7208fe /nuttx/arch/x86/src/i486 | |
parent | 2e30a3f65595e997fd3a6648b50a1d07815c39c3 (diff) | |
download | px4-nuttx-47ebc42ac1eebdd9b33d22adfd91c56b50016ef9.tar.gz px4-nuttx-47ebc42ac1eebdd9b33d22adfd91c56b50016ef9.tar.bz2 px4-nuttx-47ebc42ac1eebdd9b33d22adfd91c56b50016ef9.zip |
Add kernel mode hooks and reminders for other architectures
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3484 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/x86/src/i486')
-rw-r--r-- | nuttx/arch/x86/src/i486/up_initialstate.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nuttx/arch/x86/src/i486/up_initialstate.c b/nuttx/arch/x86/src/i486/up_initialstate.c index 9ca40feb3..c1bb422da 100644 --- a/nuttx/arch/x86/src/i486/up_initialstate.c +++ b/nuttx/arch/x86/src/i486/up_initialstate.c @@ -104,6 +104,17 @@ void up_initial_state(_TCB *tcb) xcp->regs[REG_CS] = up_getcs(); xcp->regs[REG_SS] = up_getss(); + /* Set supervisor- or user-mode, depending on how NuttX is configured and + * what kind of thread is being started. Disable FIQs in any event + * + * If the kernel build is not selected, then all threads run in + * supervisor-mode. + */ + +#ifdef CONFIG_NUTTX_KERNEL +# error "Missing logic for the CONFIG_NUTTX_KERNEL build" +#endif + /* Enable or disable interrupts, based on user configuration. If the IF * bit is set, maskable interrupts will be enabled. */ |