esp-hal icon indicating copy to clipboard operation
esp-hal copied to clipboard

Switch to atomic-waker

Open MabezDev opened this issue 1 year ago • 3 comments

Submission Checklist 📝

  • [x] I have updated existing examples or added new ones (if applicable).
  • [x] My changes were added to the CHANGELOG.md in the proper section.

Extra:

Pull Request Details 📖

Description

See the discussion in #561

MabezDev avatar Apr 14 '24 13:04 MabezDev

have you actually benchmarked this? I'm a bit skeptical this will be faster, since it does a few complex atomic CAS operations.

Dirbaio avatar Apr 14 '24 22:04 Dirbaio

I haven't yet, I plan on doing some rough benchmarking tomorrow. On single-core SoC's this will most likely be a bit slower, but not taking an all-core global lock (even for a short period) should be beneficial for the multicore SoCs, but we'll see tomorrow. Edit: maybe it might make sense to depend on both and select based on the target.

Another reason to switch was based on this discussion: https://github.com/esp-rs/esp-hal/issues/561#issuecomment-2053974295.

MabezDev avatar Apr 14 '24 22:04 MabezDev

We plan on investigating this a bit further, so just converting to a draft for the time being.

jessebraham avatar Apr 16 '24 14:04 jessebraham

I don't have time to work on this currently so I will close this for now.

MabezDev avatar May 17 '24 07:05 MabezDev