Neotron-Compute / Neotron-Pico-BIOS

BIOS for the Neotron Pico
GNU General Public License v3.0
15 stars 5 forks source link

Add critical-section API #106

Open thejpster opened 5 months ago

thejpster commented 5 months ago

Applications and the OS need to be able to enter critical sections in order to safely mutate global variables (we might have signal handlers running under interrupt context, for example).

Add an API for acquire and release which the OS can use to implement the critical-section crate, and re-export to applications.

See also https://github.com/Neotron-Compute/Neotron-Common-BIOS/issues/51