Skip to content

Possible race issues? #585

@ryancaicse

Description

@ryancaicse

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--;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions