Split allocator crate#426
Open
han-jiang277 wants to merge 7 commits into
Open
Conversation
…d ContextSwitchHookHolder Zero-dependency traits crate to break arch↔scheduler circular dependency. Co-Authored-By: Claude <noreply@anthropic.com>
Extract pure architecture code (CSR register ops, Context struct, asm macros, constants) from kernel/src/arch/riscv/mod.rs into a standalone arch crate (crate name: arch_crate). The kernel's arch module remains intact — the arch crate is linked as a separate dependency for future use. Co-Authored-By: Claude <noreply@anthropic.com>
Remove scheduler/boards/kernel-dependent code from arch crate: - Replace crate::scheduler imports with core_traits - Remove pend_switch_context kernel check (simplified) - Remove start_schedule (kernel-dependent) - Remove send_ipi (boards-dependent) - Remove trap.rs (kernel-dependent, stays in kernel crate) - Keep pure arch code: CSR ops, Context struct, macros, constants Co-Authored-By: Claude <noreply@anthropic.com>
- Complete truncated license header in arch/src/lib.rs - Apply rustfmt to core_traits/src/lib.rs, arch/src/lib.rs, arch/src/riscv/mod.rs - Apply gn format to core_traits/BUILD.gn, arch/BUILD.gn, kernel/BUILD.gn Co-Authored-By: Claude <noreply@anthropic.com>
These board-specific dependencies cause GN resolution failures for boards that don't include them in their dependency chain. Arch crate only needs core_traits, blueos_kconfig, and blueos_hal. Co-Authored-By: Claude <noreply@anthropic.com>
Required for gn gen to resolve the rustflags.txt input dependency. Without this, boards fail with 'Input to target not generated by a dependency'. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
build_prs |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/27537189948. |
|
❌ Job failed. Failed jobs: build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/27537189948. |
Move raw heap implementations (TLSF, LLFF, SLAB, block, support) to kernel/allocator/ as allocator_crate. Keep SpinLock wrappers and GlobalAlloc impl in kernel crate. Co-Authored-By: Claude <noreply@anthropic.com>
ca79688 to
09745e1
Compare
Contributor
Author
|
build_prs |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/27538348553. |
|
✅ All jobs completed successfully, see https://github.com/vivoblueos/kernel/actions/runs/27538348553. |
Contributor
Author
|
build_prs |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/27542541479. |
|
✅ All jobs completed successfully, see https://github.com/vivoblueos/kernel/actions/runs/27542541479. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.