On 10 April 2015 at 19:03, Jacob, Jerin <[email protected]>
wrote:

>
> I have query on ODP timer,
>
> Who(application/implementation) is responsible to free the odp_timeout
> event object created by
> "odp_timer_set_*" API by specifying tmo_ev == NULL ?
>
The timer implementation does not allocate or free any timeout events. This
is the responsibility of the application.


> IMO, It should be freed by the application by calling "odp_timeout_free"
>
Yes. The idea is that all timeout management (alloc and free) is done by
the user.


>
> But it looks like linux generic implementation is freeing "implementation"
> created
> odp_timeout event by "odp_timer_free". Is it true ?
>
No I don't think so. odp_timer_free() returns any existing timeout event
(i.e. when (cancelling and) freeing an active timer) to the caller.
What makes you think odp_timer_free() frees the timeout event? Perhaps the
documentation can be improved if the code is not clear enough.


> If its true then It will lead to "double free" case when the system has
> both implementation and application
> created odp_timeout objects armed to timer as there is no way distinguish
> between them.
>
> /Jerin
>
>
>
> ​
>
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to