On 23 January 2017 at 04:06, Savolainen, Petri (Nokia - FI/Espoo) <petri.savolai...@nokia-bell-labs.com> wrote: > > > >> --- /dev/null >> +++ b/helper/include/odp/helper/platform/linux-generic/threads_extn.h > > > This file and these functions are not odp-linux specific. Those depend mainly > on Linux and somewhat on ODP, but should not depend at all on the odp-linux > implementation.
I agree they perhaps should not, but currently they do call ODP APIs. For example odp_init_local and if that implementation used in lines then it has to match by platform in non ABI mode. > > Should it be moved to here: > /helper/include/odp/helper/linux/threads.h Possibly There are three categories right now - two are portable and I made one bucket for all those that are not. 1. True odp helpers used in the tests, examples etc that are portable 2. OS abstractions that are used in the tests, examples etc that are portable 3. OS specific wrappers that may make some odp calls for you, and thus must = the odp platform in non ABI mode As it stands even using the OS as a selector for (3) will mean it must still use the correct odp platform include exactly so it was simpler at this stage to leave it like that. > > > -Petri > > > >> @@ -0,0 +1,112 @@ >> +/* Copyright (c) 2016, Linaro Limited >> + * All rights reserved. >> + * >> + * SPDX-License-Identifier: BSD-3-Clause >> + */ >> + >> +/** >> + * @file >> + * >> + * ODP Linux helper extension API >> + * >> + * This file is an optional helper to odp.h APIs. These functions are >> provided >> + * to ease common setups in a Linux system. User is free to implement the >> same >> + * setups in otherways (not via this API). >> + */ >> + >> +#ifndef ODPH_LINUX_EXT_H_ >> +#define ODPH_LINUX_EXT_H_ >> + >> +#include <odp/helper/threads.h> >> + >> +#ifdef __cplusplus >> +extern "C" { >> +#endif >> + >> +/** @addtogroup odph_linux ODPH LINUX >> + * @{ >> + */ >> + >> +/** >> + * Creates and launches pthreads >> + * >> + * Creates, pins and launches threads to separate CPU's based on the >> cpumask. >> + * >> + * @param[out] pthread_tbl Table of pthread state information records. >> Table >> + * must have at least as many entries as there >> are >> + * CPUs in the CPU mask. >> + * @param mask CPU mask >> + * @param thr_params Linux helper thread parameters >> + * >> + * @return Number of threads created >> + */ >> +int odph_linux_pthread_create(odph_linux_pthread_t *pthread_tbl, >> + const odp_cpumask_t *mask, >> + const odph_linux_thr_params_t *thr_params); -- Mike Holmes Program Manager - Linaro Networking Group Linaro.org │ Open source software for ARM SoCs "Work should be fun and collaborative, the rest follows"