On Tue, Sep 15, 2015 at 5:56 AM, Petri Savolainen < [email protected]> wrote:
> Added max number of worker/control threads as global init > parameters. Implementation can e.g. optimize it's per worker > thread resource reservation or configuration accordingly. > > Maximum values are platform specific. These values come > typically from the user as command line arguments, etc. > > Signed-off-by: Petri Savolainen <[email protected]> > Reviewed-by: Bill Fischofer <[email protected]> > --- > include/odp/api/init.h | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > > diff --git a/include/odp/api/init.h b/include/odp/api/init.h > index 0683d8d..737ff6d 100644 > --- a/include/odp/api/init.h > +++ b/include/odp/api/init.h > @@ -110,8 +110,18 @@ typedef void (*odp_abort_func_t)(void) ODP_NORETURN; > * @note It is expected that all unassigned members are zero > */ > typedef struct odp_init_t { > - odp_log_func_t log_fn; /**< Replacement for the default log fn */ > - odp_abort_func_t abort_fn; /**< Replacement for the default abort > fn */ > + /** Maximum number of worker threads the user will run > concurrently. > + Valid range is from 0 to platform specific maximum. Set both > + num_worker and num_control to zero for default number of > threads. */ > + int num_worker; > + /** Maximum number of control threads the user will run > concurrently. > + Valid range is from 0 to platform specific maximum. Set both > + num_worker and num_control to zero for default number of > threads. */ > + int num_control; > + /** Replacement for the default log fn */ > + odp_log_func_t log_fn; > + /** Replacement for the default abort fn */ > + odp_abort_func_t abort_fn; > } odp_init_t; > > /** > @@ -133,9 +143,10 @@ typedef struct odp_platform_init_t { > * functions. > * > * @param params Those parameters that are interpreted by the > ODP API. > + * Use NULL to set all parameters to their > defaults. > * @param platform_params Those parameters that are passed without > * interpretation by the ODP API to the > implementation. > - * > + * Use NULL to set all parameters to their > defaults. > * @retval 0 on success > * @retval <0 on failure > * > -- > 2.5.1 > > _______________________________________________ > 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
