Message ID | 1512140407-13534-9-git-send-email-odpbot@yandex.ru |
---|---|
State | New |
Headers | show |
Series | [API-NEXT,v1,1/12] api: event: add free multiple | expand |
diff --git a/platform/linux-generic/odp_event.c b/platform/linux-generic/odp_event.c index 2b0a7cddc..1c4ab5c1b 100644 --- a/platform/linux-generic/odp_event.c +++ b/platform/linux-generic/odp_event.c @@ -37,6 +37,22 @@ odp_event_type_t odp_event_types(odp_event_t event, return _odp_buffer_event_type(buf); } +int odp_event_type_multi(const odp_event_t event[], int num, + odp_event_type_t *type_out) +{ + int i; + odp_event_type_t type = odp_event_type(event[0]); + + for (i = 1; i < num; i++) { + if (odp_event_type(event[i]) != type) + break; + } + + *type_out = type; + + return i; +} + void odp_event_free(odp_event_t event) { switch (odp_event_type(event)) {