Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement derive macro for all access types #61

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

mkroening
Copy link
Member

@mkroening mkroening commented Apr 25, 2024

This is the reason for my new barrage of PRs. Turns out, I ran into the need for using read-only pointers sooner than I expected.

This PR adds the derive macro functionality to volatile pointers of all access types.
This is done without introducing new derived traits, but by generically implementing the derived trait for all access types and determining the correct access type from self and the field's specification via the generalized restrict method from #60.

This PR depends on the following PRs:

@mkroening mkroening force-pushed the general-derive branch 2 times, most recently from e21d5a0 to bd31299 Compare April 26, 2024 09:18
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
Copy link
Member

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for all your work!

@phil-opp phil-opp merged commit 6616c04 into rust-osdev:main Apr 26, 2024
5 of 6 checks passed
@mkroening mkroening deleted the general-derive branch April 26, 2024 09:44
@phil-opp phil-opp mentioned this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants