Skip to content

the name _critical_section_1_0_acquire is defined multiple timesΒ #509

Closed
@9names

Description

We had to update our version of critical_section, since critical_section 0.2.0 will silently break when mixed with critical_section 1.0.
If you see the above error message, you need to update your dependency to rp2040-hal v0.6.1 (or downgrade to an older version of the HAL)
Sorry for any inconvenience!

Full error for anyone who needs more context:

 Compiling rp2040-hal v0.6.0 (/home/nine/vc/rust/rp2040/rphal-update/rp2040-hal)
error[E0428]: the name `_critical_section_1_0_acquire` is defined multiple times
 --> rp2040-hal/src/critical_section_impl.rs:5:1
  |
5 | critical_section_0_2::custom_impl!(RpSpinlockCs);
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `_critical_section_1_0_acquire` redefined here
6 | #[cfg(feature = "critical-section-impl")]
7 | critical_section::set_impl!(RpSpinlockCs);
  | ----------------------------------------- previous definition of the value `_critical_section_1_0_acquire` here
  |
  = note: `_critical_section_1_0_acquire` must be defined only once in the value namespace of this module
  = note: this error originates in the macro `critical_section_0_2::custom_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

Please comment or emote on this issue if you've hit this problem so we have an idea of how many people are affected.
Also: feel free to ask if you don't know how to resolve this.

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