Skip to content

Conversation

maribu
Copy link
Member

@maribu maribu commented Apr 12, 2025

Contribution description

This now ensures race-free access to the CIB tracking the number of messages queued in the ringbuffer for a given thread.

In addition, msg_avail_thread() now checks if the provided pid refers to a thread that is currently existing.

Testing procedure

  • Tests of msg_avail() should still pass
  • msg_avail_thread() and msg_avail() should no longer be racy

Issues/PRs references

None

@maribu maribu requested a review from kaspar030 as a code owner April 12, 2025 08:18
@github-actions github-actions bot added the Area: core Area: RIOT kernel. Handle PRs marked with this with care! label Apr 12, 2025
@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: needs >1 ACK Integration Process: This PR requires more than one ACK labels Apr 12, 2025
@maribu maribu requested review from benpicco and mguetschow April 12, 2025 08:19
@github-actions github-actions bot added the Process: missing approvals Integration Process: PR needs more ACKS (handled by action) label Apr 12, 2025
@maribu maribu changed the title core/msg: msg_avail_thread() and msg_avail() core/msg: fix msg_avail_thread() and msg_avail() Apr 12, 2025
@riot-ci
Copy link

riot-ci commented Apr 12, 2025

Murdock results

✔️ PASSED

caa5561 core/msg: fix msg_avail_thread() and msg_avail()

Success Failures Total Runtime
10299 0 10299 10m:03s

Artifacts

Copy link
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

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

LGTM, but CI complains.

This now ensures race-free access to the CIB tracking the number
of messages queued in the ringbuffer for a given thread.

In addition, `msg_avail_thread()` now checks if the provided pid refers
to a thread that is currently existing.

Co-authored-by: Mikolai Gütschow <mikolai.guetschow@tu-dresden.de>
@maribu maribu enabled auto-merge April 15, 2025 13:12
@github-actions github-actions bot removed the Process: missing approvals Integration Process: PR needs more ACKS (handled by action) label Apr 15, 2025
@maribu maribu added this pull request to the merge queue Apr 15, 2025
Merged via the queue into RIOT-OS:master with commit a605d05 Apr 15, 2025
26 of 27 checks passed
@maribu maribu deleted the core/msg-avail branch April 15, 2025 15:29
@maribu
Copy link
Member Author

maribu commented Apr 15, 2025

Thx a lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: core Area: RIOT kernel. Handle PRs marked with this with care! CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: needs >1 ACK Integration Process: This PR requires more than one ACK Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants