mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
sja1000: replace enter_critical_section with spinlock
Replace enter_critical_section() with spinlock-based protection to avoid sleeping in atomic or interrupt contexts. Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
This commit is contained in:
@@ -112,10 +112,7 @@ struct sja1000_dev_s
|
||||
uint8_t filters; /* STD/EXT filter bit allocator. */
|
||||
uint8_t nalloc; /* Number of allocated filters */
|
||||
uint32_t base; /* SJA1000 register base address */
|
||||
|
||||
#ifdef CONFIG_ARCH_HAVE_MULTICPU
|
||||
spinlock_t lock; /* Device specific lock */
|
||||
#endif /* CONFIG_ARCH_HAVE_MULTICPU */
|
||||
spinlock_t lock; /* Device specific lock */
|
||||
|
||||
/* Register read/write callbacks. These operations all hidden behind
|
||||
* callbacks to isolate the driver from differences in register read/write
|
||||
|
||||
Reference in New Issue
Block a user