mirror of
https://github.com/pithings/unkernel.git
synced 2026-12-06 05:29:38 +08:00
A secondary CPU's console writes reached the host as messages, which CPU 0's host takes only when CPU 0 suspends, while CPU 0's own writes went out at once, so lines printed on different CPUs interleaved. Every fd_write now takes a number from a shared counter inside the import, while the kernel still holds the lock that orders the writes, and CPU 0's host writes them by number (ConsoleOrder in js/core/cpu.ts). The kernel is unchanged. An api test prints lines in turn from four processes and checks their order.