aboutsummaryrefslogtreecommitdiff
path: root/helper/threads.c
AgeCommit message (Collapse)Author
2022-11-03helper: threads: improve odph_thread_create() timeout error messageJuha Kauraniemi
Add more debug information to thread startup timeout error message from odph_thread_create(). Signed-off-by: Juha Kauraniemi <juha.kauraniemi@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-09-15helper: threads: fix synchronized thread start in process modeMatias Elo
Memory for odph_thread_create() output thread table is given by application, so there is no guarantee that the memory can be used to synchronize child process startup. Fix this by using mmap() to create the necessary memory for thread startup synchronization. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-02-03helper: thread: get rid of an unsigned-signed comparison warningJanne Peltonen
Get rid of a warning by GCC 11 about a comparison between an unsigned variable and a signed literal. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-11-12helper: threads: deprecate old functions and parametersJere Leppänen
Deprecate odph_thread_param_t::instance, odph_odpthread_t, odph_odpthread_params_t, odph_odpthreads_create() and odph_odpthreads_join(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-09-30helper: threads: add thread stack size parameterJere Leppänen
Add a parameter in odph_thread_param_t, which allows specifying the minimum thread stack size. This parameter is used only in odph_thread_create(), it is ignored in odph_odpthreads_create(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-09-30helper: threads: add synchronized thread creation timeout parameterJere Leppänen
Add a parameter to odph_thread_common_param_t, which allows specifying the time to wait for the synchronization signal in synchronized thread creation. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-09-30helper: threads: add odph_thread_param_init()Jere Leppänen
Add helper API function to initialize thread parameters. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-09-30helper: threads: add odph_thread_common_param_init()Jere Leppänen
Add helper API function to initialize thread common parameters. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-09-07helper: thread: print pthread_create() return value to error logMatias Elo
Print pthread_create() return value to error log on failure. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-09-27linux-gen: include config.h header in install directoryMatias Elo
Previously, config.h header was not included in install dir. This caused a compilation failure when an application tried to include ODP helper headers. config.h has been moved to include/odp subdirectory to avoid naming conflicts and unnecessary includes have been removed. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reported-by: Mikko Parpala <mikko.parpala@nokia.com>
2019-08-20helper: debug: move odph_debug.h into helper APIPetri Savolainen
Moved the debug header to be part of the helper API. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2019-05-09helper: thread: implement new thread create and joinPetri Savolainen
Implemented new thread create and join functions. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
2018-11-28helper: threads: add odph_options() getter functionMatias Elo
Add function for reading parsed linux helper options. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-28helper: threads: replace odph_linux_thread_type_t with odp_mem_model_tMatias Elo
Replace enum odph_odpthread_linuxtype_t with odp_mem_model_t. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-04helper: threads: add ODPH_PROC_MODE environment variableMatias Elo
ODPH_PROC_MODE environment variable can be used to enable process mode. Setting environment variable is simpler in CI compared to using command line arguments. Signed-off-by: Matias Elo <matias.elo@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-05-14helper: thread: don't use getopt libraryPetri Savolainen
Don't use getopt library calls for helper options. Getopt library reset is not portable in practice. Library interface includes global variables and different internal state variables depending on POSIX version. There's no need for helper to use getopt calls or set getopt global variables at all. It's much more simple (and portable) to remove helper options from argv[] and return new value for argc. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-02-26update Linaro Copyrights to 2018 yearMaxim Uvarov
Using simple commands: find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9]), Linaro/ \1-2018, Linaro/g' {} + find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9])(-201[0-9]), Linaro/ \1-2018, Linaro/g' {} + Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-01-18linux-gen, include: switch std_clib.h to api+abiDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-08-25helper: use config.h headerDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-27helper: fix compilation with warningsMaxim Uvarov
After turning on lost CFLAGS for checking errors, following things needs to be corrected to make code compile. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
2017-01-22helper: move thread implementation under platformMike Holmes
Only the portable api is built by default, use --enable-helper-extn to enable non portable APIs for a helper platform Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-22helper: cleanup Linux rename to threadMike Holmes
Remove the OS specific Linux filename and use the name of the generic apis it contains which is for odp_threads Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>