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

copilot-c99: Add volatile qualifier to external stream variable #259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robdockins
Copy link
Contributor

Minor enhancements to the code generation process. This adds volatile qualifiers to external stream global variables, and allows users to select an output directory for generated code.

@ivanperez-keera ivanperez-keera changed the title Codegen enhancements Add volatile qualifier to external stream variable Apr 6, 2022
@ivanperez-keera
Copy link
Member

@robdockins the feature to customize the output directory is already in copilot. Can you please rebase this PR wrt. develop, dropping that commit and leaving only 6de857e?

No other changes are needed; if they are, I will ask.

Thanks!

@ivanperez-keera ivanperez-keera changed the title Add volatile qualifier to external stream variable copilot-c99: Add volatile qualifier to external stream variable Apr 6, 2022
@robdockins
Copy link
Contributor Author

Will do

representing external streams.

As we expect these variables to be modifed concurrently or via
interrupts, the volatile qualifier is appropriate, and prevents
the compiler from performing code motion that might cause unexpected
behavior.

Ideally, these reads (which occur at the beginning of the step function)
should also be protected by a critical section that masks interrupts or
takes a mutex.

Partially addresses Copilot-Language#257
@robdockins robdockins force-pushed the codegen-enhancements branch from 93b1df6 to 0c65be3 Compare April 14, 2022 19:32
@robdockins
Copy link
Contributor Author

Rebased as requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants