Neotron-Compute / Neotron-Pico-BIOS

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

Add critical-section API #106

Open thejpster opened 1 month ago

thejpster commented 1 month 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