Commit Graph

62 Commits

Author SHA1 Message Date
Zejun Zhao 1e183825d3 Refactor RISC-V exception-related code 2025-10-27 11:25:59 +08:00
Ruihan Li b07d06170b Remove `Rights` from VMAR 2025-10-26 10:14:00 +08:00
Arthur Paulino 6a67807fd0 Implement `IdSet::iter_in`
This patch enables more expressive ways to slice and iterate over
the `Id`s in an `IdSet` with `IdSet::iter_in`, which takes an arbitrary
`IdSetSlicer`.

`IdSet::iter_in` efficiently slices out unintended inner parts and
then, within the remaining parts, skips inactive bits by using
`BitSlice::iter_ones` from the `bitvec` crate.

It also delivers several implementations of `IdSetSlicer` so OSTD
consumers can represent `Id` ranges ergonomically.

In the Asterinas kernel, `CpuSet::iter_in` enables a cleaner way to
define an interator that cycles over the CPUs.
2025-10-25 11:23:13 +08:00
jiangjianfeng fe39a6803d Unshare VM during execve 2025-10-25 10:36:30 +08:00
Tate, Hongliang Tian c44e45ea78 Add the `IdSet<I>` utility type 2025-10-22 14:29:52 +08:00
Ruihan Li b606e3456c Don't panic if `set_child_tid` is invalid 2025-09-30 09:54:40 +08:00
jiangjianfeng 702aa7d9ee Support CLONE_PARENT flag 2025-09-29 13:27:22 +08:00
Yang Zhichao a13d2703fb Add context switch counting. 2025-09-27 21:02:23 +08:00
Zejun Zhao 6a42bb3b4a Make syscall restart mechanism work across all architectures 2025-09-26 15:10:34 +08:00
Ruihan Li 472edcf795 Clean up unnecessary features 2025-09-24 15:41:07 +08:00
Ruihan Li 652657fba5 Drop duplicate public re-exports 2025-09-10 12:10:40 +08:00
Ruihan Li a6d37f0e79 Mark all kernel modules as private 2025-08-26 18:02:56 +08:00
Chen Chengjun b1bbd6c3fe Optimize the initialization logic during Asterinas init phase 2025-08-26 14:36:59 +08:00
Ruihan Li 5b91064316 Add a method that disables page fault handlers 2025-08-14 11:59:05 +08:00
Ruihan Li 923982c2e5 Remove `user_ctx` from `Task` 2025-08-12 19:19:34 +08:00
Yuke Peng 2154124dc4 Format the user exception log 2025-07-28 15:01:49 +08:00
王英泰 3824af8c89 Add the trap section for LoongArch in OSTD 2025-07-25 17:37:24 +08:00
Qingsong Chen 6cd53fbb8a Refactor FPU context using pre_schedule_handler 2025-07-18 11:40:16 +08:00
jiangjianfeng 665de6bd35 Make RISC-V code compile under new exception APIs 2025-07-09 10:49:43 +08:00
jiangjianfeng 7f3ca86467 Refactor x86 exception related code 2025-07-09 10:49:43 +08:00
jiangjianfeng 95faea0fb0 Support WSTOPPED and WCONTINUED 2025-06-20 11:51:44 +08:00
Zhang Junyang f1c7564184 Move CPU context implementations to a specific module 2025-03-21 21:19:50 +08:00
Chen Chengjun 048fd1077c Inject post_schedule/user_page_fault handler to OSTD 2025-03-20 14:20:47 +08:00
Chen Chengjun 2a20f6b59a Add mutable functionality to the process VMAR 2025-03-20 14:20:47 +08:00
Chen Chengjun 248b24fb4e Remove UserSpace abstraction from OSTD 2025-03-20 14:20:47 +08:00
Zejun Zhao d71771e49a Re-enable CFS 2025-02-11 10:51:12 +08:00
Ruihan Li 0dca168717 Use `#[expect(lint)]`, not `#[allow(lint)]` 2025-02-08 15:10:04 +08:00
Ruihan Li 2cf4aebe7a Use `FnOnce() + Send` as task `func` 2025-01-23 09:57:10 +08:00
Marsman1996 5df8d59563 Exit when handle_user_signal fail 2024-12-26 18:33:32 +08:00
Ruihan Li 0bfe7aceb8 Utilize `ThreadLocal` 2024-12-26 14:51:20 +08:00
Zejun Zhao ced0023d6b Introduce a syscall restart mechanism 2024-12-16 21:12:08 +08:00
Ruihan Li 969ac97144 Make atomic mode panics have clear messages 2024-12-11 20:27:29 +08:00
徐启航 878f3f3760 Scheduling class support 2024-12-04 09:36:41 +08:00
Ruihan Li 39d303c72f Rename `get_current_userspace` to `current_userspace` 2024-11-15 13:24:58 +08:00
Ruihan Li e6c613f538 Rename `(Posix)ThreadExt` to `As(Posix)Thread` 2024-11-13 21:44:37 +08:00
Ruihan Li 9233d1cdbb Add `ThreadExt` and clean up `PosixThreadExt` 2024-11-13 21:44:37 +08:00
Ruihan Li a4a8807a20 Remove `KernelThreadExt` 2024-11-13 21:44:37 +08:00
Ruihan Li 7850f7e60a Resolve `borrowed_box` lint 2024-11-13 21:44:37 +08:00
Zhang Junyang 25a918d132 Print who and on which CPU the kernel panics 2024-11-07 16:39:47 +08:00
Chen Chengjun 846b3ba169 Use LinkedList to store WorkItem to avoid additional heap allocation 2024-11-01 11:24:09 +08:00
Chen Chengjun 2ac6e0e126 Avoid adding worker during workqueue enqueueing 2024-11-01 11:24:09 +08:00
Zhang Junyang 1b23182dcc Fix the thread status ordering by limiting the API 2024-10-26 22:06:41 +08:00
Zhang Junyang e319641b4d Implement system call `sched_get/set_affinity` 2024-10-26 22:06:41 +08:00
Zhang Junyang 3468ec213b Use `CpuId` with validity ensurance rather than `u32` 2024-10-26 22:06:41 +08:00
Zhang Junyang 4658b62f90 Treat thread oops with better care to avoid silent panics 2024-10-22 10:08:24 +08:00
Zhang Junyang 4823b82e41 Catch panics in threads as oops 2024-10-20 13:24:58 +08:00
Zhang Junyang 9e4257b655 Fix multiple issues pointed out by the new compiler 2024-10-13 22:32:05 +08:00
jellllly420 9cc63149f1 Remove cpu_affinity field from OSTD Task struct 2024-09-27 10:21:45 +08:00
jellllly420 8927031426 Remove priority field from OSTD Task struct 2024-09-27 10:21:45 +08:00
Jianfeng Jiang fb718fd440 Optimize the latency of lat-sig-install 2024-09-25 17:29:20 +08:00