Wildan M
bd44956e96
Capture event stat, change stat source for contexts
2026-05-12 12:24:49 +07:00
Wildan M
b3a6154445
Move dst_space_lock lower to Solve AddrSpaceWrapper lock
2026-04-27 06:50:20 -06:00
Wildan M
e9f50698dd
Remove ContextRef upgrade
2026-04-26 15:37:40 +07:00
Wildan M
2df7467d13
Use weak ContextRef for run contexts
2026-04-26 12:08:24 +07:00
Wildan M
ea1d915bbc
Make wake up optional
2026-04-26 07:15:10 +07:00
Wildan M
0534ab6377
Replace enqueue with dedicated idle contexts
2026-04-26 06:49:55 +07:00
Wildan M
de7926e05e
Do not push idle context to queue
2026-04-26 06:49:54 +07:00
Wildan M
7adceb6e80
Add idle context
2026-04-26 06:49:54 +07:00
bjorn3
7827cb6c78
Unify context list again now that we have a run queue
...
This simplifies code and ensures that exiting a context will properly
remove it from the list of contexts.
2026-04-26 06:49:54 +07:00
bjorn3
30b967022f
Fix a couple of warnings
2026-04-17 20:20:16 +02:00
Akshit Gaur
976756991a
Deficit Weighted Round Robin Scheduler
2026-04-17 06:52:03 -06:00
bjorn3
ab4abf63c9
Deduplicate Page and other paging related things between architectures
2026-04-03 22:15:00 +02:00
Wildan M
a42ec44dbf
Partially solve borrow rules
2026-04-01 08:42:18 -06:00
Wildan M
3b5a0e4c60
Apply ordered lock to AddrSpaceWrapper without solving borrow checker
2026-04-01 08:42:18 -06:00
Wildan M
6e0143cf0d
Store context to per cpu
2026-03-31 15:29:47 +07:00
bjorn3
675ba2ea51
rmm: Make a couple more methods safe
2026-03-29 17:00:36 +02:00
Ron Williams
fde164b2a0
Revert "Deficit based Weighted Round Robin Scheduler"
...
This reverts commit b7dabfc3c2 .
2026-03-22 18:44:41 +00:00
Akshit Gaur
b7dabfc3c2
Deficit based Weighted Round Robin Scheduler
2026-03-22 07:00:31 -06:00
Wildan M
84754dfc5d
Solve borrow checking by downgrading waitqueue lock
2026-03-11 09:42:06 +07:00
Wildan M
771ebdb39f
Partially solve borrow checking with PreemptGuard L1
2026-03-11 06:34:37 +07:00
Wildan M
d5ed9d8007
Optimize context spawn and init
2026-03-10 05:59:35 +07:00
Wildan M
3c2b1a11c5
Add ordered lock for time offset mutex
2026-02-25 11:42:17 +07:00
Wildan M
735c68ec30
Add ordered lock for WaitQueue mutex
2026-02-25 09:48:13 +07:00
Anhad Singh
d9eae6bb75
fix(sync/wait_condition): deadlock in WaitCondition::wait
...
Instead of using a simple switch to determine if preemption is enabled
(`is_preemptable: bool`), a counter is used instead. This handles the
case where a function holding a `PreemptGuard` calls another function
that creates a new `PreemptGuard`.
Signed-off-by: Anhad Singh <andypython@protonmail.com >
2025-12-15 13:05:29 +11:00
Anhad Singh
45aae5f963
misc(scheme/user): use preempt guard
...
Signed-off-by: Anhad Singh <andypython@protonmail.com >
2025-11-27 16:23:31 +11:00
bjorn3
65273ea898
Replace all Arc::try_new with Arc::new
...
The global allocator panics when out of memory rather than returning an
errors. In addition there are plenty of other places where we don't
handle allocation failure anyway. At some point in the future we should
systematically handle out of memory conditions, but until then let's not
pretend we do and get rid of the usage of the unstable allocator_api
feature that is unlikely to get stabilized any time soon.
2025-10-26 12:44:52 -06:00
Speedy_Lex
0931a7f49f
Resolve a huge portion of the clippy lints
2025-10-06 06:30:23 -06:00
Jeremy Soller
5dc6f7c3ba
lock ordering
2025-09-22 07:48:48 -06:00
bjorn3
2a2139c46e
Fix a couple of warnings
2025-06-28 19:37:56 +02:00
bjorn3
75edd1d34c
Fix infinite panicking when panicking during early boot
2025-04-21 16:44:27 +02:00
4lDO2
e6df56cf1b
Use saner debug IDs for kmain.
2025-04-19 16:30:49 +02:00
4lDO2
1e3e961b78
Simplify context debug names.
2025-04-19 16:30:49 +02:00
4lDO2
f40ec48b3e
Send event on thread death.
2025-04-19 16:30:46 +02:00
4lDO2
8883818501
Make kernel compile.
2025-04-19 16:30:45 +02:00
4lDO2
1d5f8fd46d
Move proc code to userspace.
2025-04-19 16:30:42 +02:00
Andrey Turkin
1921c6814b
Initial RISC-V implementation
...
Has no IRQ handling yet
2024-10-20 16:24:21 +03:00
Andrey Turkin
db32f5f7a3
Move some conditionally compiled code from common files into arch-gated files
2024-10-19 21:59:14 +03:00
Andrey Turkin
55041e2eeb
Use a custom config flag to conditionally compile DTB-specific areas
...
Would be great if we could use a feature instead, but Cargo can't do target-specific defaults features
2024-10-19 21:03:43 +03:00
4lDO2
e67c040f69
WIP: Separate process status from context status.
2024-07-15 18:08:43 +02:00
4lDO2
7fbe5c72e9
Use strong references in context set.
2024-07-15 18:08:42 +02:00
4lDO2
80fe891c6e
WIP: Replace ContextId with direct Arcs.
2024-07-15 18:08:42 +02:00
4lDO2
89d532a267
Fix half of proc scheme errors.
2024-07-15 18:08:42 +02:00
4lDO2
8f452b0b0f
WIP: continue the process transition
2024-07-15 18:08:41 +02:00
4lDO2
0da2fce64a
Separate context and process IDs.
2024-07-15 18:08:41 +02:00
4lDO2
295cc820e6
WIP: userspace signal handling
2024-07-15 17:20:55 +02:00
4lDO2
6bf8238fb1
Unset procmask for kmain.
2024-03-16 17:49:30 +01:00
4lDO2
0c6c857012
Improve LogicalCpu{Id,Set}, make set atomic.
...
Technically there should be an atomic and nonatomic set type, but perf
should be the same, as the nonatomic one would only be used when setting
the sched_affinity.
2024-03-04 19:02:56 +01:00
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