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

cpu/avr8_common: fix build with !core_thread #20240

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented Jan 9, 2024

Contribution description

When we don't enable thread mode, all schedule functions should be no-ops.

We also don't want to pull in core_idle_thread here.

Testing procedure

Run a simple application that does not make use of threads with

DISABLE_MODULE += core_thread

Issues/PRs references

@github-actions github-actions bot added Area: core Area: RIOT kernel. Handle PRs marked with this with care! Area: build system Area: Build system Platform: AVR Platform: This PR/issue effects AVR-based platforms Area: cpu Area: CPU/MCU ports labels Jan 9, 2024
@maribu maribu added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jan 9, 2024
@riot-ci
Copy link

riot-ci commented Jan 9, 2024

Murdock results

✔️ PASSED

cb76cc1 cpu/native: fix build with !core_thread

Success Failures Total Runtime
8085 0 8085 10m:55s

Artifacts

Copy link
Contributor

@nandojve nandojve left a comment

Choose a reason for hiding this comment

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

Non Blocking: why it is necessary call thread_yield_higher if there is no thread? Could be this the case to skip the call internally?

@benpicco
Copy link
Contributor Author

benpicco commented Jan 9, 2024

thread_yield_higher() is called in multiple places, changing them all would be rather invasive - just making it a no-op if there are no threads makes much more sense (and even keeps the semantics as it will only yield if there is a runnable higher priority thread).

@github-actions github-actions bot added the Platform: native Platform: This PR/issue effects the native platform label Jan 9, 2024
@benpicco benpicco enabled auto-merge January 9, 2024 22:02
@benpicco benpicco added this pull request to the merge queue Jan 9, 2024
Merged via the queue into RIOT-OS:master with commit 2e3037c Jan 10, 2024
25 checks passed
@benpicco benpicco deleted the cpu/atmega-no_thread branch January 10, 2024 07:51
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.01 milestone Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: core Area: RIOT kernel. Handle PRs marked with this with care! Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: AVR Platform: This PR/issue effects AVR-based platforms Platform: native Platform: This PR/issue effects the native platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants