-
Notifications
You must be signed in to change notification settings - Fork 361
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
Make sleep
work with isolation enabled
#2506
Conversation
0215536
to
5ba4ba5
Compare
☔ The latest upstream changes (presumably #2363) made this pull request unmergeable. Please resolve the merge conflicts. |
5ba4ba5
to
3b69f69
Compare
☔ The latest upstream changes (presumably #2524) made this pull request unmergeable. Please resolve the merge conflicts. |
0e2ff88
to
d707994
Compare
I did some tweaking to the API to make it match the one from the standard library more closely, which overall makes this a much smaller conceptual change for the rest of Miri. Please take a look and let me know what you think. :) If you like it, please squash the commits together a little -- this is ready to go, as far as I am concerned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have nits. This is a much smaller and more maintainable change than I somehow expected!
👍 Squash the commits down some then I'll approve this. (also if you want a nice description of this to live in the commit history you could write a PR description) |
21e3a76
to
c834637
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Implement a virtual monotone clock that can be used to track time while isolation is enabled. This virtual clock keeps an internal nanoseconds counter that will be increased by a fixed amount at the end of every basic block.
When a process sleeps, this clock will return immediately and increase the counter by the interval the process was supposed to sleep. Making miri execution faster than native code
.
cc @RalfJung @saethlin @JakobDegen