Skip to content

EventQueue should use RTOS tick count #5378

Closed
@kjbracey

Description

@kjbracey

Event queue porting layer is unnecessarily complicated for the RTOS environment - using Tickers and Timers to manage its time base. This in turn led to this patch to allow tuning of its timing: #5328 - original discussion of this issue occurred there.

In the RTOS, the event queue only actually needs to be able to check current tick count to determine elapsed time and decide what tick timeout to set on semaphore waits - it could just use osKernelGetTickCount. This would reduce footprint and complexity, and avoid potential glitches from using two parallel time bases.

If the porting layer does still need to work in non-RTOS environments, the original code would still need to be maintained though, which means it's not a total win in terms of source complexity. But in effect it's just extending the #ifdef that already exists around the semaphore wait.

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