VPP-893: handle multiple simultaneous event registrations
Change-Id: I8cd90820624987dbef848935e2de86fa66a86c17 Signed-off-by: Dave Barach <dave@barachs.net>
This commit is contained in:
@ -108,6 +108,13 @@ elog_event_type_register (elog_main_t * em, elog_event_type_t * t)
|
||||
|
||||
elog_lock (em);
|
||||
|
||||
/* Multiple simultaneous registration attempts, */
|
||||
if (t->type_index_plus_one > 0)
|
||||
{
|
||||
elog_unlock (em);
|
||||
return t->type_index_plus_one - 1;
|
||||
}
|
||||
|
||||
l = vec_len (em->event_types);
|
||||
|
||||
t->type_index_plus_one = 1 + l;
|
||||
|
@ -309,7 +309,6 @@ elog_event_data_inline (elog_main_t * em,
|
||||
track_index = elog_track_register (em, track);
|
||||
}
|
||||
|
||||
ASSERT (type_index < vec_len (em->event_types));
|
||||
ASSERT (track_index < vec_len (em->tracks));
|
||||
ASSERT (is_pow2 (vec_len (em->event_ring)));
|
||||
|
||||
|
Reference in New Issue
Block a user