> -----Original Message----- > From: lng-odp [mailto:[email protected]] On Behalf Of ext > Zoltan Kiss > Sent: Friday, June 05, 2015 8:51 PM > To: [email protected] > Subject: [lng-odp] [API-NEXT PATCH v3 4/9] api: event: define > odp_event_free() > > We need a convenient function which calls the right type-depending free() > function. > > Signed-off-by: Zoltan Kiss <[email protected]> > --- > include/odp/api/event.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/odp/api/event.h b/include/odp/api/event.h > index 63b476f..7ec5e76 100644 > --- a/include/odp/api/event.h > +++ b/include/odp/api/event.h > @@ -78,6 +78,16 @@ int odp_event_type(odp_event_t event); > uint64_t odp_event_to_u64(odp_event_t hdl); > > /** > + * Call the free function of the event's type > + * > + * @param event Event handle > + * > + * @note This routine aborts if event type is unsupported > + * > + */ > +void odp_event_free(odp_event_t event); > +
The first sentence should a compact one-liner. The body text follows with more detailed description. Something like, this /** * Free event * * Frees the event based on its type. Results are undefined if event * type is unknown. * * @param event Event handle * */ void odp_event_free(odp_event_t event); User should not be able to pass unsupported event types, so it's an internal error or data corruption if that happens. No need to specify that it is always checked. -Petri _______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
