|
@@ -154,7 +154,7 @@ static TaskList gReadyTaskList ;
|
|
|
static TaskList gDeadlineWaitingTaskList ;
|
|
|
|
|
|
|
|
|
-static void kernel_makeTaskReady (IRQ_MODE_ TaskControlBlock * inTaskPtr) {
|
|
|
+void kernel_makeTaskReady (IRQ_MODE_ TaskControlBlock * inTaskPtr) {
|
|
|
XTR_ASSERT_NON_NULL_POINTER (inTaskPtr) ;
|
|
|
gReadyTaskList.enterTask (MODE_ inTaskPtr) ;
|
|
|
}
|
|
@@ -229,3 +229,19 @@ static void irq_makeTasksReadyFromCurrentDate (IRQ_MODE_ const uint32_t inCurren
|
|
|
}
|
|
|
|
|
|
MACRO_REAL_TIME_ISR (irq_makeTasksReadyFromCurrentDate) ;
|
|
|
+
|
|
|
+// Synchronisation
|
|
|
+void kernel_blockRunningTaskInList (KERNEL_MODE_ TaskList & ioWaitingList) {
|
|
|
+ XTR_ASSERT_NON_NULL_POINTER (gRunningTaskControlBlockPtr) ;
|
|
|
+ ioWaitingList.enterTask (MODE_ gRunningTaskControlBlockPtr) ;
|
|
|
+ kernel_makeNoTaskRunning (MODE) ;
|
|
|
+}
|
|
|
+
|
|
|
+bool irq_makeTaskReadyFromList (IRQ_MODE_ TaskList & ioWaitingList) {
|
|
|
+ TaskControlBlock * taskPtr = ioWaitingList.removeFirstTask (MODE) ;
|
|
|
+ const bool found = taskPtr != nullptr ;
|
|
|
+ if (found) {
|
|
|
+ kernel_makeTaskReady (MODE_ taskPtr) ;
|
|
|
+ }
|
|
|
+ return found ;
|
|
|
+}
|