mirror of
https://github.com/apache/nuttx.git
synced 2026-10-04 04:38:10 +00: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:
parent
f215bf6c67
commit
380bcabba8
2 changed files with 11 additions and 67 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue