Commit Graph

63 Commits

Author SHA1 Message Date
bjorn3 219d707362 Introduce HandleMap helper type 2026-04-13 20:51:24 +02:00
bjorn3 3a2200198a Always compile the code of sys_fdstat 2026-04-13 19:43:44 +02:00
bjorn3 2405a7ebb3 Move kmain and kmain_ap to startup/mod.rs 2026-04-12 18:41:00 +02:00
bjorn3 89a29f4e56 Reduce usage of wildcard imports 2026-04-09 15:23:34 -06:00
bjorn3 f8d93023dd Fix a couple of warnings 2026-03-28 17:07:33 +01:00
Wildan M eeb03bdcb1 Revert "Add ordered lock for WaitQueue mutex"
This reverts commit 735c68ec30.
2026-03-10 12:11:09 +07:00
Wildan M 735c68ec30 Add ordered lock for WaitQueue mutex 2026-02-25 09:48:13 +07:00
Ibuki Omatsu 5a8858ff81 refactor: Initialize sys schem resources when they are first accessed. 2026-02-12 06:24:43 -07:00
Ibuki Omatsu 5ac00f5533 Remove namespace management from the kernel. 2026-01-20 20:43:34 -07:00
bjorn3 cc01d14d3b Unconditionally enable sys_stat 2025-10-25 18:52:07 +02:00
Speedy_Lex 0931a7f49f Resolve a huge portion of the clippy lints 2025-10-06 06:30:23 -06:00
bjorn3 ac35b7984a Fix kernel debugger 2025-09-25 17:26:31 +02:00
Jeremy Soller 5dc6f7c3ba lock ordering 2025-09-22 07:48:48 -06:00
bjorn3 da6f7adb42 Use HashMap rather than BTreeMap for scheme handles
According to the comments this previously wasn't done due to hashbrown
not having a const constructor. While it is true that HashMap::new() is
not const, HashMap::with_hasher() is const. HashMap::new() becoming
const is likely blocked on const traits.

This shrinks the kernel image by about 35kb.
2025-09-13 12:00:37 +02:00
bjorn3 cea93f7647 cargo fix --edition & rustfmt
Or to be precise:
RUST_TARGET_PATH=$(pwd)/targets cargo fix --edition \
--target targets/x86_64-unknown-kernel.json \
--target targets/i686-unknown-kernel.json \
--target targets/aarch64-unknown-kernel.json \
--target targets/riscv64-unknown-kernel.json \
-Zbuild-std=core,alloc --allow-dirty --bin kernel
cargo fmt
2025-09-10 16:44:36 +02:00
4lDO2 ef5de94150 Use sys scheme for kstop rather than signals. 2025-03-31 14:59:00 +02:00
4lDO2 3ae117b812 Outsource x86 RTC handling to rtcd. 2025-03-30 15:28:25 +02:00
Vincent Berthier 2da88c18c0 Add the sys:stat scheme 2025-02-22 14:27:10 +00:00
4lDO2 09eaf12201 Add optional fdstat sys scheme statistic. 2025-02-19 11:55:18 +01:00
4lDO2 97f60de4ef WIP: Add getdents opaque_id 2024-09-11 22:09:29 +02:00
4lDO2 339271b4d7 Add getdents syscall, and switch schemes to it. 2024-09-11 22:09:26 +02:00
Andrey Turkin d2ebc7ff05 Wholesale fix of warnings
Pretty straightforward changes. This commit tries to avoid making any non-trivial fixes.
2024-09-04 10:55:01 +03:00
4lDO2 d94baa2712 Run rustfmt. 2024-07-15 17:50:18 +02:00
Jacob Lorentzon bf0fc66ac1 Improved scheme protocol. 2024-06-14 11:31:51 +00: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
4lDO2 6b642d62a6 Disable trigger_debugger again. 2023-12-13 11:08:12 +01:00
4lDO2 3be015ce4d Make sys: global. 2023-12-13 11:08:11 +01:00
4lDO2 036a4bdee4 Replace syscall::Scheme with KernelScheme. 2023-11-15 20:00:47 +01:00
4lDO2 da491fd5fc Disable sys:trigger_debugger by default. 2023-10-08 11:21:59 +02:00
4lDO2 0cdfb886c0 Fix debugger for x86_64, disable sc debug. 2023-07-28 13:40:00 +02:00
Jeremy Soller 6fca481a0a Merge branch 'mm' into 'master'
Usercopy migration

Closes #82 and #115

See merge request redox-os/kernel!219
2023-07-06 13:03:21 +00:00
4lDO2 56f88e80c2 Usercopy migration 2023-07-06 13:03:21 +00:00
4lDO2 fa7d1c821f Replace Box<dyn Fn> with fn in sys: scheme. 2023-07-05 17:08:00 +02:00
Jeremy Soller d298459686 Add sys:irq 2022-11-18 14:18:06 -07:00
Jeremy Soller 8e0f54cb31 Clippy fixes 2022-11-11 13:19:14 -07:00
Jeremy Soller 6b2439f1b9 Improved 32-bit x86 support 2022-08-18 14:57:15 -06:00
4lDO2 1cdd462244 Move the initfs scheme to userspace. 2022-07-27 10:52:22 +02:00
4lDO2 de28cc4918 Add a Scheme supertrait for kernel-only methods. 2022-07-27 10:51:45 +02:00
4lDO2 e6e1348072 Implement exec, and change UserGrant allocator. 2022-07-27 10:51:44 +02:00
Jeremy Soller d331f72f2a Use UTF-8 for all paths 2021-04-28 20:06:07 -06:00
Robin Randhawa 02c37d3fae WIP: aarch64 rebase 2021-01-15 05:54:42 -07:00
Graham MacDonald aa1b11cc8a move calc_seek_offset* to syscall 2020-06-19 23:53:30 +01:00
Graham MacDonald 01f95b644d change seek sig to match posix - signed pos and result 2020-06-19 23:31:55 +01:00
4lDO2 1165445602 Add spurious IRQ handling, using a visible counter. 2020-05-03 16:56:50 +02:00
Jeremy Soller fdf46d8043 Fix multi_core livelocks and add livelock debugging 2020-04-19 08:46:50 -06:00
Joshua Abraham 6a48ae3d8b Fix deadlock in sys: scheme
This patch fixes a deadlock in the sys: scheme that is triggered
when the iostat resource() is called in the same scope where the RwLock
protecting the scheme's handles is write-locked.
2020-01-25 17:39:51 -05:00
Jeremy Soller 63e2a835e0 Fix clippy.sh script and fix a number of clippy warnings 2019-10-06 11:04:06 -06:00
jD91mZM2 cf0a7620df Add ptrace exit breakpoint
This will let you stop at process exit and inspect it right before the
process dies.
2019-08-15 14:23:54 +02: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