## Goal Make the scheduler SMP-safe so that tasks do not race across cores. ## Tasks - [ ] Implement spinlock (`ldaxr` / `stlxr` / `dmb ish`) - [ ] Protect run queue operations with spinlock - [ ] Implement work-stealing: if local run queue empty, steal from another CPU's queue - [ ] Test: N tasks across N cores each printing their CPU ID without interleaving corruption
Goal
Make the scheduler SMP-safe so that tasks do not race across cores.
Tasks
ldaxr/stlxr/dmb ish)