Skip to content
Commit e1836718 authored by Andrew Jackson's avatar Andrew Jackson Committed by Anas Nashif
Browse files

kernel: Add k_event_set_masked primitive



There is no easy way to clear event bits without
the potential for a race to exist between producer(s)
and consumer(s). The result of this race is that events
can be lost through the various resetting mechanisms
available (flag to k_event_wait(), or k_event_set()).

Add k_event_set_masked() which permits bits to be set or cleared.
This allows consumers to clear just the bits that they have read
without (accidentally) discarding any new bits.

Update unit tests to verify the functionality.

Partly Fixes #46117.

Signed-off-by: default avatarAndrew Jackson <andrew.jackson@amd.com>
parent e7e827a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment