Skip to content
Commit 24bfa409 authored by Dhananjay Gundapu Jayakrishnan's avatar Dhananjay Gundapu Jayakrishnan Committed by Anas Nashif
Browse files

kernel: k_queue: extend k_queue API to append unique element



k_queue has k_queue_append API which does not check if the element's
address already exists. This creates a problem if the same element
address is appended to queue. This forms circular list showing
unintended behaviour for the application using queue. The proposed
API k_queue_find_and_append takes care of checking if element exists
already before appending. This API is complimentary to k_queue_remove
which checks if the queue element is present before removing.

Signed-off-by: default avatarDhananjay Gundapu Jayakrishnan <dhananjay.jayakrishnan@proglove.de>
parent 887c74a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment