Skip to content

sys/event: allow calling event_post multiple times#8986

Merged
kaspar030 merged 1 commit intoRIOT-OS:masterfrom
haukepetersen:opt_event_allowmultipleposts
Apr 20, 2018
Merged

sys/event: allow calling event_post multiple times#8986
kaspar030 merged 1 commit intoRIOT-OS:masterfrom
haukepetersen:opt_event_allowmultipleposts

Conversation

@haukepetersen
Copy link
Copy Markdown
Contributor

Contribution description

Currently, event_post() triggers a failed assertion when called for an event, that is already queued (somewhere). In some use-cases, it is however useful, to be able to call event_post() more than once for the same event, for example when using events similar to thread_flags.

This PR modifies the event_post() function slightly, so that it can be call multiple times for the same event, simply leaving the event untouched in case it is already queued.

Issues/PRs references

none

@haukepetersen haukepetersen added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Apr 19, 2018
@haukepetersen haukepetersen requested a review from kaspar030 April 19, 2018 14:47
@cladmi cladmi added Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. and removed Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. labels Apr 19, 2018
@cladmi
Copy link
Copy Markdown
Contributor

cladmi commented Apr 19, 2018

Mistake, not counting as a API change as it is not removing any functionality.

@haukepetersen
Copy link
Copy Markdown
Contributor Author

@kaspar030 ping

Copy link
Copy Markdown
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

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

ACK.

@kaspar030 kaspar030 merged commit 734944a into RIOT-OS:master Apr 20, 2018
maxvankessel pushed a commit to maxvankessel/RIOT that referenced this pull request Apr 20, 2018
…tipleposts

sys/event: allow calling event_post multiple times
@haukepetersen
Copy link
Copy Markdown
Contributor Author

thanks!

@haukepetersen haukepetersen deleted the opt_event_allowmultipleposts branch April 20, 2018 14:14
@cladmi cladmi added this to the Release 2018.07 milestone Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants