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

Avoid as much trap as possible in the scheduler #464

Open
ia0 opened this issue May 10, 2024 · 0 comments
Open

Avoid as much trap as possible in the scheduler #464

ia0 opened this issue May 10, 2024 · 0 comments
Labels
crate:scheduler Modifies the platform for:usability Improves users (and maintainers) life needs:implementation Needs implementation to complete

Comments

@ia0
Copy link
Member

ia0 commented May 10, 2024

Search for all functions returning Result<_, Trap> and fix them if needed.

Good candidates are:

  • MemoryApi::alloc() should return World:NotEnough (or something similar).
  • Applet::{enable,disable}() should probably return User::InvalidState.
  • Scheduler::disable_event() is similar to above.
  • or_trap!() should be replaced with or_fail!().

Bad candidates are:

  • Wrong memory accesses (e.g. MemoryApi::{get,get_mut}()) should continue to Trap.

The distinction is not always clear. It would be good to come up with a criteria of whether an operation should trap or error.

This is part of #43.

@ia0 ia0 added needs:implementation Needs implementation to complete for:usability Improves users (and maintainers) life crate:scheduler Modifies the platform labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate:scheduler Modifies the platform for:usability Improves users (and maintainers) life needs:implementation Needs implementation to complete
Projects
None yet
Development

No branches or pull requests

1 participant