12345678910111213141516171819202122232425262728293031323334353637383940 |
- #pragma once
- #include "software-modes.h"
- #include "task-list-32-tasks.h"
- // Task routine type
- typedef void (* RoutineTaskType) (USER_MODE) ;
- // kernel_createTask
- void kernel_createTask (INIT_MODE_
- uint64_t * inStackBufferAddress,
- uint32_t inStackBufferSize,
- RoutineTaskType inTaskRoutine) ;
- struct TaskControlBlock ;
- void kernel_makeTaskReady (IRQ_MODE_ TaskControlBlock * inTaskPtr);
- TaskControlBlock * descriptorPointerForTaskIndex (const uint8_t inTaskIndex) ;
- uint8_t indexForDescriptorTask (const TaskControlBlock * inTaskPtr) ; // should be not nullptr
- // Task termination
- void taskSelfTerminates(USER_MODE) asm ("task.self.terminates");
- void service_taskSelfTerminates(KERNEL_MODE) asm ("service.task.self.terminates");
- //$service task.self.terminates
- // Task suspension
- void kernel_blockOnDeadline (KERNEL_MODE_ const uint32_t inDeadline);
- // Task reactivation
- void irq_makeTasksReadyFromCurrentDate (IRQ_MODE);
- // Synchronization
- void kernel_blockRunningTaskInList (KERNEL_MODE_ TaskList & ioWaitingList);
- bool irq_makeTaskReadyFromList (IRQ_MODE_ TaskList & ioWaitingList);
|