Skip to content

Atomic operations in PSRAM (esp. with 3rd party libraries) #2027

Open
@ProfFan

Description

@ProfFan

AFAIK the current atomic operations on the S3 uses native atomics. However this creates a problem: a 3rd party library could be using atomics on their data structure placed on the SPI PSRAM.

In the IDF, they handled it by first checking for PSRAM address, then try acquire the external RAM lock, then do CAS: https://github.com/espressif/esp-idf/blob/c9df77efbf871d4c3ae9fb828778ff8c4ab36804/components/esp_hw_support/cpu.c#L199

I wonder if a similar thing should be done for the S3 (for example, a PR to portable-atomic that adds a feature for a similar implementation?

Based on discussions with @ivmarkov

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:blockedUnable to progress - dependent on another taskupstreamThe issue lies with a dependency

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions