diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2010-08-14 01:56:13 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2010-08-14 01:56:13 +0000 |
commit | 10b05d374b100d2dadec07a376017dd98c5dbbaa (patch) | |
tree | d98b3a09eb055adbc02219d07f05c5c21a77823d /nuttx/sched/os_start.c | |
parent | 6429e60702c10fc02be04dfd9222570b14e328ad (diff) |
Beginning to add on-demand paging logic
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@2850 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/sched/os_start.c')
-rw-r--r-- | nuttx/sched/os_start.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nuttx/sched/os_start.c b/nuttx/sched/os_start.c index 78b1c79973..ac52c4d664 100644 --- a/nuttx/sched/os_start.c +++ b/nuttx/sched/os_start.c @@ -130,6 +130,12 @@ volatile dq_queue_t g_waitingformqnotempty; volatile dq_queue_t g_waitingformqnotfull; #endif +/* This is the list of all tasks that are blocking waiting for a page fill */ + +#ifdef CONFIG_PAGING +volatile dq_queue_t g_waitingforfill; +#endif + /* This the list of all tasks that have been initialized, but not yet * activated. NOTE: This is the only list that is not prioritized. */ @@ -166,6 +172,12 @@ pidhash_t g_pidhash[CONFIG_MAX_TASKS]; pid_t g_worker; #endif +/* The task ID of the page fill worker thread */ + +#ifdef CONFIG_PAGING +pid_t g_pgworker; +#endif + /* This is a table of task lists. This table is indexed by * the task state enumeration type (tstate_t) and provides * a pointer to the associated static task list (if there @@ -188,6 +200,9 @@ const tasklist_t g_tasklisttable[NUM_TASK_STATES] = { &g_waitingformqnotempty, true }, /* TSTATE_WAIT_MQNOTEMPTY */ { &g_waitingformqnotfull, true } /* TSTATE_WAIT_MQNOTFULL */ #endif +#ifdef CONFIG_PAGING + { &g_waitingforfill, true } /* TSTATE_WAIT_PAGEFILL */ +#endif }; /**************************************************************************** @@ -240,6 +255,9 @@ void os_start(void) dq_init(&g_waitingformqnotfull); dq_init(&g_waitingformqnotempty); #endif +#ifdef CONFIG_PAGING + dq_init(&g_waitingforfill); +#endif dq_init(&g_inactivetasks); sq_init(&g_delayeddeallocations); |