Commit Graph

20 Commits

Author SHA1 Message Date
bjorn3 782ec87f27 Fix UB in the locking code of context switching
The spin crate considers it UB to call force_write_unlock while there is
a threads trying to obtain a read lock on the same rwlock.

This also switches to the spinning_lot crate for the context rwlock as
it has support for a write guard keeping a reference to the rwlock using
an Arc instead of a reference.
2024-02-25 17:07:41 +01:00
Jeremy Soller 45f1c4e29e Add rustfmt from relibc and apply it with cargo fmt 2024-01-17 13:52:01 -07:00
bjorn3 2d065083df Use HashMap instead of BTreeMap where possible
This shrinks the kernel from 905840 bytes to 862408 bytes.
2023-12-13 19:55:20 +01:00
bjorn3 017702d3d2 Remove a lot of dead code 2023-12-12 15:01:29 +00:00
4lDO2 16cb32b178 Make WaitQueue::new() const fn. 2023-09-06 08:47:52 +02:00
4lDO2 56f88e80c2 Usercopy migration 2023-07-06 13:03:21 +00:00
Jeremy Soller 8e0f54cb31 Clippy fixes 2022-11-11 13:19:14 -07:00
4lDO2 7ac5bdbae0 WIP: Implement userspace-driven shutdown. 2021-05-06 19:49:58 +02:00
Jeremy Soller fdf46d8043 Fix multi_core livelocks and add livelock debugging 2020-04-19 08:46:50 -06:00
Jeremy Soller 5a42b6dd76 Add notify_signal method to WaitCondition to simulate being woken by a signal 2019-07-18 19:48:54 -06:00
Jeremy Soller 76e0ed2e37 Make all wait_map members public 2019-07-18 19:48:27 -06:00
jD91mZM2 fe705d9b63 Switch to 2018 edition
Most of this was generated by the absolutely extraordinary `cargo fix`
subcommand. There were still 2 errors and a few warnings to patch up,
but compared to the normal 600+ errors, I'd say the fixer did a damn
good job! I'm also amazed that I could still start the VM after this,
I half expected some kinds of runtime failure...
2019-06-21 12:12:01 +02:00
Jeremy Soller ef919f3d52 Implement EINTR for anything using wait_queue 2018-12-22 08:02:00 -07:00
Jeremy Soller 5b31bf57be Update to latest rust 2018-11-08 17:25:57 -07:00
Jeremy Soller 58e1d92eb5 Add clippy lints, action some clippy items 2017-12-24 22:19:00 -07:00
Jeremy Soller ed05564011 Remove SwitchResult, use out of band data to detect interruption
Update debugging code
2017-11-14 21:16:35 -07:00
Tibor Nagy e6b9f850d1 Migrate from collections 2017-10-28 02:42:08 +02:00
Jeremy Soller 51339cb8c9 Cleanup warnings
Implement interrupt on signal in pipe:
2017-10-21 20:30:20 -06:00
Jeremy Soller 906ef94ffd Fix bug with sleep - wake is not cleared after it occurs
Do not initialize waitcondition with capacity
2017-03-21 20:30:46 -06:00
Jeremy Soller 0c8ba636f4 Cleanup Redox repo, update Rust, remove old target 2017-01-03 15:55:00 -07:00