nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

Implement spinlock on top of atomic api and remove up_testset

Open xiaoxiang781216 opened this issue 2 years ago • 2 comments

See the discussion here: https://github.com/apache/incubator-nuttx/pull/6283

xiaoxiang781216 avatar May 19 '22 16:05 xiaoxiang781216

@xiaoxiang781216 For example, cxd56xx needs to use up_testset API because the SoC has a restriction to use ldrex and strex.

masayuki2009 avatar May 30 '22 23:05 masayuki2009

Yes, in your case not only up_testset, but also atomic_xxx need rewrite for cxd56xx. The issue description is still right, it's better to use atomic api directly, but implement atomic api has different approach:

  1. boolchain's bultin
  2. libs/libc/machine/arc_atomic. for single core
  3. chip special one(e.g. cxd56xx)

xiaoxiang781216 avatar May 31 '22 08:05 xiaoxiang781216