Switch to user-mode before starting a new task

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5742 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2013-03-14 22:44:06 +00:00
parent f9ca53339d
commit a2888902dd
3 changed files with 7 additions and 2 deletions

View File

@ -44,6 +44,7 @@
#include <nuttx/userspace.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm.h>
#include <nuttx/sched.h>
#if defined(CONFIG_NUTTX_KERNEL) && !defined(__KERNEL__)
@ -101,6 +102,10 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) =
.us_bssstart = (uintptr_t)&_sbss,
.us_bssend = (uintptr_t)&_ebss,
/* Task/thread startup stubs */
.task_startup = task_startup,
/* Memory manager entry points (declared in include/nuttx/mm.h) */
.mm_initialize = umm_initialize,

View File

@ -344,7 +344,7 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_SYS_RESERVED=4
CONFIG_SYS_RESERVED=5
#
# Device Drivers

View File

@ -249,7 +249,7 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_SYS_RESERVED=4
CONFIG_SYS_RESERVED=5
#
# Device Drivers