On 13 April 2015 at 17:01, Ola Liljedahl <[email protected]> wrote:
> Fail to create timer pool with zero timer resolution. > https://bugs.linaro.org/show_bug.cgi?id=1451 > > Signed-off-by: Ola Liljedahl <[email protected]> > --- > (This document/code contribution attached is provided under the terms of > agreement LES-LTM-21309) > > platform/linux-generic/odp_timer.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/platform/linux-generic/odp_timer.c > b/platform/linux-generic/odp_timer.c > index 500f7f1..e5391dc 100644 > --- a/platform/linux-generic/odp_timer.c > +++ b/platform/linux-generic/odp_timer.c > @@ -691,6 +691,11 @@ odp_timer_pool_create(const char *name, > const odp_timer_pool_param_t *param) > { > /* Verify that buffer pool can be used for timeouts */ > + /* Verify that we have a valid (non-zero) timer resolution */ > + if (param->res_ns == 0) { > + __odp_errno = EINVAL; > + return NULL; > + } > odp_timer_pool_t tp = odp_timer_pool_new(name, param); > return tp; > } > Running this case again gives a somewhat opaque error message. odp_shared_memory.c:265:odp_shm_reserve(): msg_pool: No huge pages, fall back to normal pages, check: /proc/sys/vm/nr_hugepages. odp_timer_test.c:394:main():Timer pool create failed. I wonder if that is informative enough given it was caused by passing a specific command line argument "-r0" - maybe the help should say -r0 is illegal ? I think there be an error message to the user as soon as they pass 0 for r. > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > [email protected] > https://lists.linaro.org/mailman/listinfo/lng-odp > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
