MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / OnPreempted

Method OnPreempted

src/task/include/fifo_scheduler.hpp:83–85  ·  view source on GitHub ↗

* @brief 任务被抢占时调用 * * FIFO 是不可抢占调度器,但如果外部强制抢占,则需要统计 * * @param task 被抢占的任务 */

Source from the content-addressed store, hash-verified

81 * @param task 被抢占的任务
82 */
83 auto OnPreempted([[maybe_unused]] TaskControlBlock* task) -> void override {
84 stats_.total_preemptions++;
85 }
86
87 /// @name 构造/析构函数
88 /// @{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected