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

Safe handling of physical actions in single-threaded C runtime #1348

Merged
merged 41 commits into from
Dec 23, 2022
Merged

Conversation

lhstrh
Copy link
Member

@lhstrh lhstrh commented Sep 3, 2022

Prior to these changes, it was not possible to asynchronously access the event queue from an interrupt service routine on bare-iron platforms. This PR -- currently still a work in progress -- should enable the use of physical actions on embedded platforms.
Known issues:

  • the compiler currently forces the the use of the threaded runtime if there are physical actions; this behavior needs to be changed, but it's not clear how exactly. Not all embedded platforms are single-threaded.
  • ...

@lhstrh lhstrh added c Related to C target feature New feature labels Sep 3, 2022
@petervdonovan
Copy link
Collaborator

The tracing tests are failing on Windows for both Python and C with ERROR_ACCESS_DENIED, which seems to just be the same as a segmentation fault, and I cannot reproduce the error locally, even on Windows.

@lhstrh
Copy link
Member Author

lhstrh commented Sep 4, 2022

That is rather bizarre... 😔

@lhstrh
Copy link
Member Author

lhstrh commented Sep 4, 2022

It sounds like a race condition. I believe that if tracing is enabled the threaded runtime is always used...

@edwardalee
Copy link
Collaborator

See lf-lang/reactor-c#106 (review)

@erlingrj erlingrj marked this pull request as ready for review December 23, 2022 03:32
@erlingrj
Copy link
Collaborator

erlingrj commented Dec 23, 2022

This is ready for merge. Arduino is still supported as a target platform. I think you removed the support in reactor-c, so should we remove it here as well?

@lhstrh
Copy link
Member Author

lhstrh commented Dec 23, 2022

Not sure about Arduino. It kind of depends on what @arengarajan99 is up to, but I haven't heard from him in a while.

Copy link
Member Author

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

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

Looks great, @erlingrj! Thanks for much for whipping this into shape.

@lhstrh lhstrh merged commit d109927 into master Dec 23, 2022
@lhstrh lhstrh deleted the lock-time branch December 23, 2022 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c Related to C target feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants