Skip to content

solve issues on front methods on locking queues #1345

@danielfaleirosantos

Description

@danielfaleirosantos

The front() methods on locking queues (i.e. queue_spsc_isr, queue_spsc_locked, queue_lockable and queue_mpmc_mutex) have two issues that have been identified:

  • The methods should return by value to prevent race conditions (i.e. when returning by reference, accessing the memory space can cause a race condition if some other access modifier is happening).
  • the locking queues should lock through a mutex and etl::lock_guard(mutex). This was done (and then reverted) in commit 0f11716, but I think some extra investigation needs to be done as I think it was not optimized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions