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(idt): make it available in the stable Rust #271

Merged
merged 11 commits into from
Jul 7, 2021

Conversation

toku-sa-n
Copy link
Member

This PR makes the idt module available for use in the stable Rust with the instructions feature.

Especially, this PR

  • exposes Entry::set_handler_addr as an unsafe method. This is the only way for the users of this crate who build it with the stable Rust to set the addresses of the interrupt or exception handlers.
  • defines the handler function types as () if the abi_x86_interrupt feature is not enabled. These types are only used with the abi_x86_interrupt feature.

Copy link
Contributor

@josephlr josephlr left a comment

Choose a reason for hiding this comment

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

This is a really good idea, really only style nits here, the overall change seems reasonable.

This change is also backwards compatible, which is great!!

src/structures/idt.rs Outdated Show resolved Hide resolved
src/structures/idt.rs Outdated Show resolved Hide resolved
src/structures/idt.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@josephlr josephlr left a comment

Choose a reason for hiding this comment

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

Nice job, thanks for making the change.

src/structures/idt.rs Outdated Show resolved Hide resolved
src/structures/idt.rs Outdated Show resolved Hide resolved
src/structures/idt.rs Outdated Show resolved Hide resolved
@josephlr
Copy link
Contributor

I'll give @phil-opp a chance to look over this, but LGTM on my end.

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.

I left a few suggestions for the docs, but otherwise this looks good to me. Thanks, @toku-sa-n!

src/structures/idt.rs Show resolved Hide resolved
src/structures/idt.rs Show resolved Hide resolved
src/structures/idt.rs Show resolved Hide resolved
@josephlr josephlr merged commit 66b11eb into rust-osdev:master Jul 7, 2021
@toku-sa-n toku-sa-n deleted the stable_idt branch July 7, 2021 13:20
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.

3 participants