Skip to content

Commit acfdc58

Browse files
equeue: skip equeue_incid call for user allocated events while dispatching
User allocaded events doesn't utilize id field in a way that normal event does, so we shouldn't call equeue_incid on it
1 parent 69a7d67 commit acfdc58

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

events/source/equeue.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,9 @@ void equeue_dispatch(equeue_t *q, int ms)
506506
e->target += e->period;
507507
equeue_enqueue(q, e, equeue_tick());
508508
} else {
509-
equeue_incid(q, e);
509+
if (!EQUEUE_IS_USER_ALLOCATED_EVENT(e)) {
510+
equeue_incid(q, e);
511+
}
510512
equeue_dealloc(q, e + 1);
511513
}
512514
}

0 commit comments

Comments
 (0)