Runtime for C11 atomics missing #1642

Closed
opened 2024-02-20 13:14:51 -06:00 by sgstreet · 4 comments
sgstreet commented 2024-02-20 13:14:51 -06:00 (Migrated from github.com)

The Pico-SDK does not provide an implementation of standard C11 atomic functions, this makes implementing multi-core algorithms more complicated and error prone while decreasing software potability from Cotrex-M3/4/7 code bases. Unfortunately the Cortex-M0+ does not provide LDREX and STREX instructions for multi-core lock-less atomic operations and thus most tool chains do not provide implementations.

The Pico-SDK should provide an implementation of the C11 atomic functions using interrupt masking for single core atomic read/write/modify operations combined with hardware spin locks to accommodate the RP2040 symmetric dual core design.

The Pico-SDK does not provide an implementation of standard C11 atomic functions, this makes implementing multi-core algorithms more complicated and error prone while decreasing software potability from Cotrex-M3/4/7 code bases. Unfortunately the Cortex-M0+ does not provide LDREX and STREX instructions for multi-core lock-less atomic operations and thus most tool chains do not provide implementations. The Pico-SDK should provide an implementation of the C11 atomic functions using interrupt masking for single core atomic read/write/modify operations combined with hardware spin locks to accommodate the RP2040 symmetric dual core design.
sgstreet commented 2024-02-20 13:15:37 -06:00 (Migrated from github.com)

PR inbound later today.

PR inbound later today.
sgstreet commented 2024-02-20 17:21:18 -06:00 (Migrated from github.com)

@kilograham the PR is up and I'm looking forward to your thoughts.

@kilograham the PR is up and I'm looking forward to your thoughts.
sgstreet commented 2024-07-09 15:53:23 -05:00 (Migrated from github.com)

New PR #1763 up

New PR #1763 up
kilograham commented 2024-11-11 11:31:33 -06:00 (Migrated from github.com)

this was fixed in 2.0.0

this was fixed in 2.0.0
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#1642
No description provided.