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
6c6fc18f8e
Format
2024-02-16 21:40:42 -07:00
Jeremy Soller
86589aa7fa
Only switch to idle process when no other processes can run
2024-02-13 14:46:21 -07:00
Jeremy Soller
45f1c4e29e
Add rustfmt from relibc and apply it with cargo fmt
2024-01-17 13:52:01 -07:00
bjorn3
017702d3d2
Remove a lot of dead code
2023-12-12 15:01:29 +00:00
4lDO2
45d1c256ea
Add LogicalCpuSet as a sched affinity mask.
2023-09-04 21:57:54 +02:00
4lDO2
3b725b2c27
Add logical CPU ID newtype, switch to u32.
2023-09-04 21:27:48 +02:00
4lDO2
a78d6e42f8
Stop using #[thread_local] on x86_*.
2023-08-08 12:01:42 +02:00
4lDO2
bdd5c954dc
Move PIT_TICKS to context::switch.
2023-08-08 12:01:42 +02:00
4lDO2
ad78dcc5a1
WIP: Rudimentary MAP_SHARED fmap implementation.
2023-07-25 10:52:21 +02:00
4lDO2
56f88e80c2
Usercopy migration
2023-07-06 13:03:21 +00:00
4lDO2
58c0c5d040
Remove one level of indirection for Context::name.
2023-05-27 14:27:34 +02:00
4lDO2
ac913e49f9
Pin kmain contexts to corresponding CPUs.
2023-02-24 23:05:11 +01:00
Jeremy Soller
01df1c20da
Use TableKind everywhere
2022-08-20 13:06:52 -06:00
Jeremy Soller
be12d0f1bd
Add initial i686 arch module
2022-07-29 18:12:49 -06:00
4lDO2
dc8ce1c22b
Partial: migrate context handling code to RMM.
2022-07-27 10:52:23 +02:00
4lDO2
8970ce1fe7
Benefit from addrspace abstraction in switch.
2022-07-27 10:52:22 +02:00
4lDO2
351d77ad9b
Improve floating point handling.
2022-07-27 10:52:22 +02:00
4lDO2
94578efd1e
Use alloc_zeroed when allocating FX.
2022-07-27 10:52:22 +02:00
4lDO2
f2926f5f25
Pre-initialize the context list at compile time.
2021-07-05 11:30:08 +02:00
Jeremy Soller
2aa4d8caf5
Merge remote-tracking branch 'origin/aarch64-rebase' into riscv64
2021-05-03 20:52:59 -06:00
4lDO2
47c3b2269f
Fix context switching.
...
Previously there was a triple fault, due to a combination of reasons
(e.g. rsp and rbp being ordered in the struct and in the assembly).
Now, the locks will be held __all the way until the new context__ has
been switched to, which completely eliminates any possibility that the
"pcid fault" originates here.
While I am unsure whether this will work, this could also be an
opportunity to be able to remove CONTEXT_SWITCH_LOCK fully.
2021-02-13 21:55:40 +01:00
Robin Randhawa
1e10cac3e1
aarch64: Increase storage for FP context to consider AArch64's needs
...
Brute-forcing this at present. Would be better to wrap this
conditionally for the architecture.
2021-01-28 16:51:50 +00:00
Robin Randhawa
02c37d3fae
WIP: aarch64 rebase
2021-01-15 05:54:42 -07:00
Jeremy Soller
315343be41
Add a way to snapshot context state
2020-04-19 08:46:50 -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
30e68f917e
Remove env scheme and env field on context, fix all warnings
2018-08-11 11:34:32 -06:00
17liamnaddell
2de83eb932
fix small documentation bug
2018-07-21 21:46:11 -04:00
17liamnaddell
c06f403dd2
second round of documentation
2018-07-21 20:48:33 -04:00
17liamnaddell
9d1fb3013d
First round of documentation changes
2018-07-18 22:48:08 -04:00
Jeremy Soller
c28c147add
Update to new dependencies
2018-06-19 18:17:16 -06:00
Jeremy Soller
99a3bff2da
WIP: New event system
2018-05-20 11:08:37 -06:00
Jeremy Soller
48007b8f1e
Update to new allocation API (WIP)
2018-04-28 22:07:43 -06:00
Jeremy Soller
083c444a68
Implement waitpid on PGID
2018-01-05 20:31:15 -07:00
Jeremy Soller
49d5c33928
Add support for WCONTINUED and WUNTRACED
...
Fix issues with SIGCONT
2018-01-03 22:34:50 -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
Jeremy Soller
51339cb8c9
Cleanup warnings
...
Implement interrupt on signal in pipe:
2017-10-21 20:30:20 -06:00
Jeremy Soller
07262fd866
Implement sending signals to process groups. Modify max context value to fit inside of isize
2017-07-23 15:55:47 -06:00
Jeremy Soller
3f40af0687
Update to new allocator API
2017-07-08 19:50:58 -06:00
Jeremy Soller
e43f5dda81
Implement timeouts
...
Cleanup utf8 path error handling
2017-04-08 21:59:30 -06:00
Jeremy Soller
2087544ea7
Move all files to src
2017-04-03 21:47:01 -06:00
Jeremy Soller
0c8ba636f4
Cleanup Redox repo, update Rust, remove old target
2017-01-03 15:55:00 -07:00