Message ID | 1433526691-20058-5-git-send-email-zoltan.kiss@linaro.org |
---|---|
State | New |
Headers | show |
Ok On 09/06/15 14:12, Savolainen, Petri (Nokia - FI/Espoo) wrote: > > >> -----Original Message----- >> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of ext >> Zoltan Kiss >> Sent: Friday, June 05, 2015 8:51 PM >> To: lng-odp@lists.linaro.org >> 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 <zoltan.kiss@linaro.org> >> --- >> 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 >
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); + +/** * @} */
We need a convenient function which calls the right type-depending free() function. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> --- include/odp/api/event.h | 10 ++++++++++ 1 file changed, 10 insertions(+)