This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | regs_struct |
struct | task_struct |
struct | execbase_struct |
Typedefs | |
typedef regs_struct | regs_t |
typedef task_struct | task_t |
typedef execbase_struct | execbase_t |
Functions | |
void | bsleep (ushort sleeptime) |
Voluntarily give up CPU time, sleep for sleeptime ms. | |
void | addtask (void(*func)(void), schar priority, ushort nextrun, ushort stacksize) |
Creates & inserts (@ sorted positions) a task into exec task list. | |
void | execprep (void) |
Prepares the global execbase_t exec struct; creates idle task. | |
Variables | |
execbase_t | exec |
|
|
|
Definition at line 8 of file exec.h. Referenced by task_dumpinfo(). |
|
Definition at line 23 of file exec.h. Referenced by addtask(), bsleep(), context_restore2(), context_save2(), create_task(), find_imperative_task(), find_nextrun_lte(), find_priority_lte(), find_urgent_task(), insert_task_prior(), insert_task_time(), task_select(), unlink_prior(), and unlink_time(). |
|
Creates & inserts (@ sorted positions) a task into exec task list. After creating & initialising the new task, finds where the task should be inserted into in both the priorty and time exec list.
Definition at line 277 of file exec.c. References create_task(), exec, find_nextrun_lte(), find_priority_lte(), execbase_struct::head_prior, execbase_struct::head_time, insert_task_prior(), insert_task_time(), NULL, execbase_struct::numtasks, schar, task_t, and ushort.
00278 { 00279 task_t *new_task = create_task(func, priority, nextrun, stacksize); 00280 task_t *pPrior, *pTime; 00281 00282 if (NULL != exec.head_time) { /* Assume head_time reflects head_prior */ 00283 pPrior = find_priority_lte(exec.head_prior, priority); /* NULL state. */ 00284 pTime = find_nextrun_lte(exec.head_time, nextrun); 00285 } else { 00286 pPrior = NULL; 00287 pTime = NULL; 00288 } 00289 insert_task_prior(pPrior, new_task); 00290 insert_task_time(pTime, new_task); 00291 00292 exec.numtasks++; 00293 00294 return; 00295 } |
Here is the call graph for this function:
|
Voluntarily give up CPU time, sleep for
Unlinks
Definition at line 314 of file exec.c. References ASM_CLI, ASM_SEI, ASM_SWI, execbase_struct::blocked, execbase_struct::current, exec, find_nextrun_lte(), execbase_struct::head_time, execbase_struct::idle, insert_task_time(), MSEC2TCNT, task_struct::nextrun, task_t, TCNT_H, TOUSHORT, unlink_time(), and ushort. Referenced by btnscan_chk(), lbdrv_chg(), and misc().
00315 { 00316 task_t *pTime; 00317 00318 exec.current->nextrun = TOUSHORT(TCNT_H) + (ushort) MSEC2TCNT(sleeptime); 00319 ASM_SEI; /* Don't want other tasks mangling the list in mid-search. */ 00320 unlink_time(exec.current); 00321 pTime = find_nextrun_lte(exec.head_time, exec.current->nextrun); 00322 insert_task_time(pTime, exec.current); 00323 ASM_CLI; 00324 exec.idle = true; 00325 exec.blocked = false; /* If a blocking task just finished, */ 00326 /* clear flag so isr_exec() can re-enable exec timer. */ 00327 ASM_SWI; /* Trigger an INTR to enter isr_exec() */ 00328 00329 return; 00330 } |
Here is the call graph for this function:
|
Prepares the global
MUST be called before
Definition at line 561 of file exec.c. References bfree(), bmemset(), create_task(), exec, exec_idle(), execbase_struct::idle_task, and task_struct::stack.
|
Here is the call graph for this function:
|
Definition at line 40 of file exec.h. Referenced by addtask(), bsleep(), exec_idle(), execprep(), find_urgent_task(), insert_task_prior(), insert_task_time(), isr_exec_stuff(), task_select(), unlink_prior(), and unlink_time(). |