On Wed, Jun 03, 2015 at 09:37:54PM +0200, Ola Liljedahl wrote: > On 3 June 2015 at 20:42, Zoltan Kiss <[email protected]> wrote: > > > On that note it turned out this will be a lot bigger than I thought ... > > And I already have two questions: > > > > - what should we do if an assert over odp_queue_enq fails? E.g. > > "CU_ASSERT(odp_queue_enq(queue, ev) == 0)" Should we free the events, or > > just leave it? > > > If we want the validation program to terminate cleanly, I assume the caller > has to free any buffers that weren't enqueued or they will be leaked and > then things will go bad when the program is terminating. > > > > - there are numerous places where you don't know what kind of event you > > are actually queue, so should we make an odp_event_free() call?, e.g. > > > I have also encountered this situation. I even started to write a post to > the list about it. But in the end I hacked around it, probably by switching > on the event type and calling different free functions. Having an > odp_event_free() would be simpler and clearer so I second your suggestion > here. > > -- Ola
Me too. Actually it looks like I did; odp_buffer_free(odp_buffer_from_event(ev)); Is this not sufficient?.. anyway I agree odp_event_free() would be clearer. -- Stuart. _______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
