#include "typedefs.h"
#include "mkernel_config.h"
Go to the source code of this file.
Classes | |
| struct | t_task_descriptor |
| the static part of an task. More... | |
| struct | t_tcb |
| The task control block. More... | |
Defines | |
| #define | PROC_FREE 0 |
| The process is free. | |
| #define | PROC_COMPUTING 1 |
| The task is ready for CPU usage. | |
| #define | PROC_TERMINATE 2 |
| Task is terminated. | |
| #define | PROC_WAIT_TIMER 3 |
| Wait for a timer event. | |
| #define | PROC_WAIT_EVENT 4 |
| Wait for an EVENT. | |
| #define | PROC_WAIT_RESOURCE 5 |
| Wait for a resource to become free. | |
| #define | PROC_SUSPENDED 6 |
| OSEK/VDX: suspended state. | |
| #define | PROC_NOT_EXIST 8 |
| Is returned if you enquire the status of an task with an id which is not in the range of the allowes task id's. | |
| #define | LOW_PRIORITY 1 |
| Priority. | |
| #define | NORMAL_PRIORITY 2 |
| #define | HIGH_PRIORITY 3 |
| #define | DADDR __near byte* |
| address of an data area | |
| #define | FULL 1 |
| VDX/OIL: full preemptive scheduling. | |
| #define | NON 0 |
| VDX/OIL: non preemptive scheduling. | |
| #define | ANY_TASK 100 |
| Idle task number. used to address all tasks. | |
| #define | NULL_TASK_ID 101 |
| #define | STACK_SIZE_KERNEL 150 |
| The size of the kernel stack. | |
Typedefs | |
| typedef byte | t_task_id |
| this type is used to denote tasks. | |
| typedef t_task_id | TaskType |
| OSEK:VDX task identification. | |
| typedef TaskType * | TaskRefType |
| typedef void(* | t_task_code )(void *) |
| NULL reference to the code of the taks. | |
| typedef void * | TASK_ARGUMENT |
| Task Argument. | |
Functions | |
| void | Schedule (void) |
| void | _os_yield (void) |
| StatusType | _os_task_create (t_task_id id, t_task_descriptor *descr) |
| StatusType | _os_task_switch (t_task_id id) |
| Switch to an given task. | |
Variables | |
| t_tcb | _TCB [] |
| const int | _os_max_tcb |
| POINTER | _os_kernel_stack |
| t_tcb * | _os_current_task |
| byte | _os_mode |
Processes with HIGH_PRIORITY will not be schedulued premeptive, this means the high priority task has to return the CPU after the actual job has been done (e.g. Task_Delay, Task_Wait etc).
Processes with NORMAL and LOW priority will be prepemted by the scheduler.
After a process becomes active because of an event, e.g. wakeup or a recevied message the scheduler will allow the process to run longer to allow fast processing of the incomming event.
Definition in file proc.h.
|
|
Idle task number. used to address all tasks. This id may be used if you want to send some events to the idle task. The idle task will consume the event without any side effect. |
|
|
The task is ready for CPU usage. Task in this state a subject to execution. |
|
|
The process is free. This indicates an unused TCB entry |
|
|
Task is terminated. A TCB in this state indicates a task which is in the process of termination. The scheduler will release on the next scheduling of this process all resources which are registered with this process. |
|
|
Wait for an EVENT. The scheduler provides a simple event mail box (see kernel.h). The process waits for an event from this mail box for a given time. |
|
|
Wait for a timer event. The kernel supports to sorts of timer events. The so called scheduled timer and an auxillary timer (see timer.h). The process encountered by the scheduler is waiting for a given number of CPU ticks a to change in the state PROC_COMPUTING. |
|
|
The size of the kernel stack. When the tick handler is called it runs on the so called kernel stack. This is done to safe stack space for each task, otherwise the space would have been needed on each individial stack. |
|
|
Task Argument. A task is represented as function which gets one argument of the type TASK_ARGUMENT. |
|
|
Switch to an given task.
|
1.4.6