Skip to content

sys/xtimer: Remove dependency to core_msg#11230

Merged
benpicco merged 2 commits into
RIOT-OS:masterfrom
maribu:xtimer_msg_deps
Nov 1, 2019
Merged

sys/xtimer: Remove dependency to core_msg#11230
benpicco merged 2 commits into
RIOT-OS:masterfrom
maribu:xtimer_msg_deps

Conversation

@maribu

@maribu maribu commented Mar 21, 2019

Copy link
Copy Markdown
Member

Contribution description

When module core_msg is not used, xtimer now no longer provides the features related to messages. This allows using xtimer without core_msg.

Testing procedure

The tests test/xtimer* should still work

Issues/PRs references

Spun out of #11226

@maribu maribu added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: timers Area: timer subsystems labels Mar 21, 2019
@maribu

maribu commented Mar 21, 2019

Copy link
Copy Markdown
Member Author

Instead of adding multiple pairs of #ifdef MODULE_CORE_MSG ... #endif to every file this PR relocates the code depending on core_msg, so that only a single pair is required. Therefore the relatively high number of lines changed.

@maribu maribu requested review from OlegHahm, kaspar030 and miri64 March 21, 2019 16:19
@stale

stale Bot commented Sep 22, 2019

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale Bot added the State: stale State: The issue / PR has no activity for >185 days label Sep 22, 2019
@miri64

miri64 commented Sep 23, 2019

Copy link
Copy Markdown
Member

@kaspar030 IMHO this looks interesting and should also be a lesson learned for ztimer.

@stale stale Bot removed the State: stale State: The issue / PR has no activity for >185 days label Sep 23, 2019
@miri64

miri64 commented Sep 23, 2019

Copy link
Copy Markdown
Member

(@maribu, needs rebase)

@maribu maribu force-pushed the xtimer_msg_deps branch 2 times, most recently from 20aba0d to 3211147 Compare October 17, 2019 09:55
@maribu

maribu commented Oct 17, 2019

Copy link
Copy Markdown
Member Author

@miri64: Rebased. I also adapted an xtimer test to disable module core_msg, so that the dependency does not sneak back in when this is merged.

@benpicco

Copy link
Copy Markdown
Contributor

Murdock is not happy - looks like some missing includes that were pulled in before by accident.

@maribu

maribu commented Oct 31, 2019

Copy link
Copy Markdown
Member Author

@benpicco: Thanks for reminding me of this. Now the missing #includes are added.

@benpicco

Copy link
Copy Markdown
Contributor

Feel free to squash.

When module `core_msg` is not used, `xtimer` now no longer provides the features
related to messages. This allows using `xtimer` without `core_msg`.
Enforce that xtimer is usable without module core_msg

@benpicco benpicco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The first commit just moves code around.

I verified that tests/xtimer_hang still works without it.
It saves 28 bytes for arduino-mega2560 and 12 bytes for samr21-xpro.

For all other tests it's still included through DEFAULT_MODULE, so no changes there.

@benpicco benpicco merged commit 865059f into RIOT-OS:master Nov 1, 2019
@fjmolinas fjmolinas added this to the Release 2020.01 milestone Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: timers Area: timer subsystems CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants