Hi, the lock us->lock seems to guard the variable us->locked. However, the lock is released before accessing us->locked. Should it be a bug?
|
static inline void uart_lock(struct mgos_uart_state *us) { |
|
mgos_rlock(us->lock); |
|
us->locked++; |
|
} |
|
|
|
static inline void uart_unlock(struct mgos_uart_state *us) { |
|
mgos_runlock(us->lock); |
|
us->locked--; |
|
} |
Hi, the lock
us->lockseems to guard the variableus->locked. However, the lock is released before accessingus->locked. Should it be a bug?mongoose-os/src/mgos_uart.c
Lines 42 to 50 in 1ce6061