Reorganize kernel/ Crate#2659
Conversation
We were going to have "appslice.rs", and we have "errorcode.rs", so I propose we use "processbuffer.rs" instead of "mem.rs". |
I'm in favor. |
|
Updates:
|
|
Chiming in to say all the changes so far look good to me. Looks like the remaining work is mostly porting stuff in chips/ and arch/ to use the new organization / names? |
|
Hail, nano33ble, and artye21 now compile. This is going to take a while to do all of the boards. If you want to help, please add commits to this PR and I will rebase them. See 47eca24, 7ef79ea, or f982756 as a template for what needs to change for boards, and c5737e3, c4f5dc1, and 81098da for chips. |
|
I will update raspberry, stms and microbit today. |
|
As I don't think I can push to this branch, I opened PRs for:
|
|
Ok all boards compile and I changed SyscallDispatch to SyscallDriverLookup. |
hudson-ayers
left a comment
There was a problem hiding this comment.
I reviewed all the changes to the kernel crate and am happy with them. I then reviewed changes to a few random capsules, chip, and arch files and they were all straightforward changes where the compiler would catch any breakages. So I am pretty happy with this as-is!
Thanks for taking this on, it was clearly a huge undertaking but I think it makes Tock a lot more approachable.
|
bors r+ |
e6a995a to
e048e0c
Compare
|
I forgot to change the function name in KernelResources so I did that as well. |
|
lets try this again: bors r+ |
tock/tock#2659 renamed the Tock kernel's `Driver` trait to `SyscallDriver`, because the term "driver" has too many different meanings in Tock. This change does the same, but `libtock_unittest`'s fake version of the trait.
352: Rename `fake::driver` to `fake::SyscallDriver`. r=jrvanwhy a=jrvanwhy tock/tock#2659 renamed the Tock kernel's `Driver` trait to `SyscallDriver`, because the term "driver" has too many different meanings in Tock. This change does the same, but `libtock_unittest`'s fake version of the trait. Co-authored-by: Johnathan Van Why <jrvanwhy@google.com>
2659: Reorganize kernel/ Crate r=hudson-ayers a=bradjc ### Pull Request Overview This PR is the updated version of tock#2545 and tock#2551. It does a holistic reorganization of the entire kernel crate. Highlights: - Almost everything is now exported as `kernel::module::Type` rather than `kernel::Type`. - /common is split up into /utilities and /collections - `trait Chip` has been updated to only include operations that a hardware microcontroller chip crate should provide. - Things that were in `trait Chip` or passed ad-hoc are now part of `trait KernelResources`. This new trait is now the de-facto way that a board configures the kernel. - `Driver` is now `SyscallDriver`. ### Testing Strategy todo ### TODO or Help Wanted - A whole lot of other code has to change (in largely mechanical ways) to work with these changes. But it would be easier to make sure this looks good to everyone first. - [x] Decide on a filename for `mem.rs`. It was going to be `appslice.rs`, but now it would ostensibly be `process_buffer.rs`. However, that somewhat collides with the `process_*.rs` family of files, which are all about processes themselves. - [x] Rebase after tock#2632 is merged. ### Documentation Updated - [x] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Brad Campbell <bradjc5@gmail.com> Co-authored-by: Alexandru Radovici <alexandru.radovici@wyliodrin.com> Co-authored-by: Alexandru Radovici <msg4alex@gmail.com>
Pull Request Overview
This PR is the updated version of #2545 and #2551.
It does a holistic reorganization of the entire kernel crate.
Highlights:
kernel::module::Typerather thankernel::Type.trait Chiphas been updated to only include operations that a hardware microcontroller chip crate should provide.trait Chipor passed ad-hoc are now part oftrait KernelResources. This new trait is now the de-facto way that a board configures the kernel.Driveris nowSyscallDriver.Testing Strategy
todo
TODO or Help Wanted
A whole lot of other code has to change (in largely mechanical ways) to work with these changes. But it would be easier to make sure this looks good to everyone first.
Decide on a filename for
mem.rs. It was going to beappslice.rs, but now it would ostensibly beprocess_buffer.rs. However, that somewhat collides with theprocess_*.rsfamily of files, which are all about processes themselves.Rebase after Support aliasing of process-allowed memory #2632 is merged.
Documentation Updated
/docs, or no updates are required.Formatting
make prepush.