Skip to content

Interrupt-safe locking structures, like Mutex and RwLock, for Rust no_std environments.

Notifications You must be signed in to change notification settings

theseus-os/irq_safety

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

irq_safety: Interrupt-safe spinlock Mutex/RwLock

Irq-safe locking via Mutex and RwLock.

Offers identical behavior to the regular spin crate's Mutex and RwLock, with the added behavior of holding interrupts for the duration of the Mutex guard.

When the lock guard is dropped (falls out of scope), interrupts are re-enabled if and only if they were enabled when the lock was obtained.

Also provides a interrupt "holding" feature without locking, see the HeldInterrupts type.

This crate is designed for no_std usage within an OS kernel or in an embedded context.

Supported architectures:

  • x86
  • x86_64
  • aarch64
  • arm

We welcome contributions from anyone, especially for new architectures.

About

Interrupt-safe locking structures, like Mutex and RwLock, for Rust no_std environments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages