Fix backwards logic for cancellation flag
This commit is contained in:
parent
60265e807c
commit
3340168097
5 changed files with 61 additions and 41 deletions
|
|
@ -22,7 +22,7 @@ static inline uint32_t atomic_dec(volatile uint32_t *p) {
|
|||
#else
|
||||
|
||||
static inline uint32_t atomic_load(const volatile uint32_t *p) {
|
||||
return __atomic_load_n(p, __ATOMIC_RELAXED);
|
||||
return __atomic_load_n(p, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
static inline uint32_t atomic_inc(volatile uint32_t *p) {
|
||||
|
|
|
|||
|
|
@ -1287,7 +1287,7 @@ static bool ts_parser__advance(
|
|||
if (++self->operation_count == OP_COUNT_PER_TIMEOUT_CHECK) {
|
||||
self->operation_count = 0;
|
||||
if (
|
||||
(self->cancellation_flag && !atomic_load(self->cancellation_flag)) ||
|
||||
(self->cancellation_flag && atomic_load(self->cancellation_flag)) ||
|
||||
(self->clock_limit && get_clock() - self->start_clock > self->clock_limit)
|
||||
) {
|
||||
ts_subtree_release(&self->tree_pool, lookahead);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue