mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
b7b06a0857
add hardware abstraction layer with posix implementation: - setitimer: generates periodic sigalrm for tick-based scheduling - signal handler: calls mrb_tick on each timer interrupt - sigprocmask: enables/disables interrupts by blocking sigalrm - usleep: idle cpu implementation for posix platforms the hal is initialized during gem init and starts the periodic timer automatically. non-posix platforms get stub implementations. tick period is configurable via MRB_TICK_UNIT (default 4ms). Co-authored-by: Claude <noreply@anthropic.com>