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

Mmap flush does not require mutable reference, use corret mut ref self #58

Merged
merged 3 commits into from
Oct 2, 2023

Conversation

timvisee
Copy link
Member

This does three things:

  • Flushing does not require a mutable reference, because the kernel uses a global mutex. So we switched from inner_mut() to inner().
  • Use &mut self rather than &self in inner_mut() method. Remove clippy error bypass for it.
  • Only implement Sync on MmapViewSync for testing.

I believe more may be wrong with this regarding soundness. But possibly is a good start for some improvements.

Copy link
Member

@agourlay agourlay left a comment

Choose a reason for hiding this comment

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

Not entirely sure but this looks legit 👍

@timvisee
Copy link
Member Author

Not entirely sure but this looks legit 👍

The above is also the reason why flush() got a &self rather than a &mut self.

@timvisee timvisee merged commit a7de0f5 into master Oct 2, 2023
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.

2 participants