Issues with rust-level lock_and_signal #2781
Labels
A-runtime
Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone
The lock_and_signal implemented in libcore/sys.rs has two issues:
-- Easy solution: Add a preempt_disable counter in the rt scheduler, à la linux spinlocks, that it checks every yield
-- Hard solution: Make the scheduler know how to reschedule to the owner of a lock on the same core. (Still requires unkillable, I think)
fn lock(fn() -> T) -> T
is a cute interface, but doesn't support lock interleaving. Add acquire/release.The text was updated successfully, but these errors were encountered: