mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
e49f42570c
dynamically enable/disable timer interrupts based on scheduler state. timer disabled when only one runnable task exists. timer enabled when multiple tasks need preemption or sleeping tasks need wakeup. use counter arrays to track ready/waiting tasks per vm. separate platform-specific timer control from generic decision logic. update counters at all task state transitions. eliminates 250 interrupts/second in single-task workloads. improves cpu efficiency and power consumption. simplifies porting to new platforms. Co-authored-by: Claude <noreply@anthropic.com>