mirror of
https://github.com/apache/nuttx.git
synced 2026-05-14 19:38:39 +08:00
23d65cb97f
The overhead of spinlok is less than mutext (mutex need to call enter_critical section.) After this patch, `down_write_trylock` and `down_read_trylock` can be use in interrupt context. The instruction is protected with mutex only one instruction so using spinlock is better. Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>