#include <avr/pgmspace.h>
#include "types.h"
#include "otos_cfg.h"
#include "message.h"
#include "hardware.h"
#include "mutex.h"
Go to the source code of this file.
Data Structures | |
struct | otos_task |
Defines | |
#define | OTOS_TASK_FUNCTION(pFunc, pArg) |
#define | SCHED_NORM 0 |
#define | SCHED_BLOCK 1 |
#define | otosInterruptReturn() otosScheduler(SCHED_NORM) |
Return from Interrupt. | |
#define | otosBlock() otosScheduler(SCHED_BLOCK) |
Block task for ever. | |
#define | DUMP_QUEUES ((void) 0) |
Typedefs | |
typedef otos_task | OtosTask |
Functions | |
OtosTask * | otosCreateTask (void(*pFunc)(void *), void *pArg, uint8_t prio, uint16_t stacksize, uint8_t name) |
Create a task. | |
OtosTask * | otosGetRunningTask (void) |
Get pointer to the running task. | |
uint8_t | otosSetPriority (uint8_t prio) |
Set the priority of the running task. | |
void | otosScheduler (uint8_t operation) |
Distribute CPU time. | |
void | otosMain (void) __attribute__((noreturn)) |
uint8_t | otosSetPreemtive (uint8_t timeSlice) |
Enable/disable preemtive multitasking. | |
uint8_t | otosGetPreemtive (void) |
Get status of preemtive multitasking. |
Definition in file task.h.
|
Value: void pFunc(void* pArg) __attribute__ ((noreturn)); \ void pFunc(void* pArg) |
|
Create a task. If the created task has a priority higher than the running task, the new task is started immediately, else it is inserted in the ready queue.
Definition at line 113 of file task.c. References otosAllocate(), otosInsertTaskInQueue(), and otosScheduler(). Referenced by main(). |
|
Get status of preemtive multitasking.
Definition at line 560 of file task.c. References g_timeSliceTicks. |
|
Get pointer to the running task.
Definition at line 190 of file task.c. References g_pRunningTask. |
|
Distribute CPU time.
Definition at line 368 of file task.c. References g_performDispatch, g_pReadyQueue, g_pRunningTask, otosDispatch(), otosError(), otosGetTickDiff(), otosGetTicks(), and otosInsertTaskInQueue(). Referenced by OTOS_TASK_FUNCTION(), otosCreateTask(), otosSendEvent(), otosSendMessage(), otosSetPriority(), otosSleep(), otosUnlockMutex(), and SIGNAL(). |
|
Enable/disable preemtive multitasking.
Definition at line 533 of file task.c. References g_timeSliceCounter, and g_timeSliceTicks. |
|
Set the priority of the running task.
Definition at line 204 of file task.c. References g_pRunningTask, and otosScheduler(). |