-
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
Patch to ensure that deadlines with zero delay are never met #86
Conversation
Looks like the test you added in lf-lang/lingua-franca#1217 is still failing. |
Yeah, I'm not sure why, unfortunately - it passes locally for me. |
You could force the generator to take at least one jiffy interval before calling lf_set(). The jiffy interval can be as big as 30 msec on some machines, I think. |
Actually, on reflection, I think your suggestion is better. We should change the logic of deadlines to always trigger the deadline handler if the deadline is zero. The current design will always be nondeterministic, I think, but I think it's better if the meaning of a zero deadline were deterministic so that it can be used for testing. |
…nstream scheduling to use the same logic
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 looks right to me!
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.
LGTM!
With this change, if a reactor has a deadline field of zero, the runtime treats it as a deadline with duration zero (so it is always violated). For a description of the issue, see: lf-lang/lingua-franca#1203.