-
Notifications
You must be signed in to change notification settings - Fork 24
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
Making MIN_SLEEP_DURATION a platform variable and Add busy wait #403
base: main
Are you sure you want to change the base?
Conversation
I made the |
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.
Good direction. Suggestions added.
@@ -23,6 +25,7 @@ void _lf_initialize_clock() { | |||
} | |||
|
|||
lf_print("---- System clock resolution: %ld nsec", res.tv_nsec); | |||
MIN_SLEEP_DURATION = NSEC(res.tv_nsec); |
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.
This implementation does not match the description of the PR.
8d2bdd8
to
c2b5f8d
Compare
As discussed in #332, I have moved forward to make the following changes for the threaded runtime:
MIN_SLEEP_DURATION
thewait_until
function busy waits untilwait_until_time
is reached.MIN_SLEEP_DURATION
was defined as an arbitrary constant of 10 usec, I changed that to be a platform variable such that the value ofMIN_SLEEP_DURATION
is equal to underlying system's clock resolution.