sysml / mini-os

Minimalistic Operating System for Xen
Other
65 stars 23 forks source link

console: provide assured printing #8

Closed skuenzer closed 10 years ago

skuenzer commented 10 years ago

Provide a new option to Mini-OS to compile with an assured print implementation (CONFIG_CONSFRONT_SYNC). The default implementation drops printing characters whenever the console ring is full. When CONFIG_CONSFRONT_SYNC is enabled (disabled by default), print will busy-loop and wait for free space on the ring in order to print every character. This is useful for debugging because it is ensured that all messages are print to the console (e.g., stack traces on crashes). However, note that busy-loop might slow down your application when it calls print too often or with too big strings.

Fixes #6.

jpemartins commented 10 years ago

Tested and working. Thanks a lot!