aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/spec/init.h
AgeCommit message (Collapse)Author
2023-12-19api: thread: move ODP_THREAD_COUNT_MAX to types headerMatias Elo
Move ODP_THREAD_COUNT_MAX specification and definition to thread_types headers where they belong to. No functional API changes. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2023-09-01api: update copyright formatMatias Elo
Update all API files to use the new shorter copyright format: /* SPDX-License-Identifier: BSD-3-Clause * Copyright (c) <YEAR> <COPYRIGHT HOLDER> */ Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-07-07api: init: add new ODP_LOG_WARN log levelMatias Elo
Add new ODP_LOG_WARN log level to odp_log_level_t. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Acked-by: Ashwin Sekhar T K <asekhar@marvell.com>
2023-06-09api: init: add abnormal termination functionTuomas Taipale
New `odp_term_abnormal()` function can be used to abnormally terminate an ODP application. Application can utilize the new function to terminate ODP with additional debug data in error situations where regular local and global clean-up is not possible. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-06-09api: init: clarify ODP call usage in abort functionTuomas Taipale
Clarify that no ODP calls should be called in the application-provided abort function. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-11-11api: init: add function for reading current instance handleMatias Elo
Add odp_instance() function for reading the current ODP instance handle. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-11-11api: init: add missing descriptions to log levelsMatias Elo
Add missing descriptions to odp_log_level_t enums. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-09-29api: feature: move content to std_types.hPetri Savolainen
Maintain all common types and definitions in one file (std_types.h). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-05-05linux-gen: implement odp_thread_set_log_fn()Jere Leppänen
Implement the odp_thread_set_log_fn() API function. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-05-05api: introduce thread specific log functionJere Leppänen
The odp_log_thread_fn_set() API allows the caller to set a thread specific log function. This log function is called to do output when the thread calls other API functions. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-04-07api: improve doxygen module descriptionPetri Savolainen
The first line after @defgroup tag shows up in doxygen module summary page. Add missing descriptions and improve current ones. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2019-04-30api: init: calls to cpumask functions before initPetri Savolainen
Improve specification of initialization and termination steps. Explicitly list those functions that may be used before global init (those that are needed for setting up parameters). No change to functionality. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <billf@me.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2019-02-04api: spec: correct coding style issuesPetri Savolainen
Clean checkpatch warnings that do not affect API signatures in all api/spec header files. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-11-28api: init: add new mem_model member to odp_init_tMatias Elo
Add new odp_mem_model_t enum for configuring application memory model. This enables an application to operate in process mode without the need to modify ODP configuration file. 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-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-02-12api: init: add shm memory size parameterPetri Savolainen
Application memory usage may vary a lot. Implementation may need to pre-allocate memory or address space already at init time to be able to guarantee e.g. the same VA address space for all threads. Total SHM memory usage information is needed at global init time, as implementation likely uses the same shared memory for its own global memory allocations. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-01-18include: change spec guarding define from ODP_API to ODP_API_SPECDmitry Eremin-Solenikov
Change defines guarding inclusion of ODP API spec files from ODP_API_FOO to ODP_API_SPEC_FOO, as they are placed in odp/api/spec/foo.h path. 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-11-10api: init: add support for unused featuresBill Fischofer
Add the not_used field to odp_init_t to permit applications to specify that they will not use various ODP features. This may allow implementations to provide optimized behavior. Also add the odp_init_param_init() API to initialize odp_init_t to default values. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-12linux-generic: moving the visibility files one step upChristophe Milard
include/odp/api/visibility_begin.h and include/odp/api/visibility_end.h move one step up (in include/odp/) and can therefore be used on other interfaces. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-04-21api: make only the API visibleAnders Roxell
Internal functions should not be part of symbols that are visible outside the library. Using -fvisibility=hidden hides all internal functions from the public ABI. Suggested-by: Ricardo Salveti <ricardo.salveti@linaro.org> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-04-21api: init: add control/worker cpumasks to init dataGary S. Robertson
Adds pointers to externally supplied cpumasks for control and worker CPUs to the ODP global init data which is passed as an argument to odp_init_global. The intent is to allow an external entity to pass in lists of the CPU resources available to the current ODP application. It is assumed that these pointers would be NULL unless explicitly populated prior to calling odp_init_global. odp_init_global would respond to NULL pointers here by ensuring that odp_cpumask_default_control and odp_cpumask_default_worker would return the platform-specific default CPU configurations. If these pointers were not NULL when odp_init_global was called, then the above functions would return cpumasks reflecting the (possibly amended) contents of the referenced cpumasks instead of the platform defaults. Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-04-21api: init: add instance handlePetri Savolainen
Added opaque odp_instance_t handle for storing ODP instance ID. Global init generates instance ID which is used to identify an ODP instance in the system. Instance ID allows to launch multiple separate ODP applications (without name space clash). Application threads define in odp_init_local() call which instance they join. Simultaneously, a thread may belong to only single instance and thus odp_term_local() call does not need instance handle parameter. Currently, linux-generic implementation supports only single instance. Linux helper pthread and process create APIs were updated with instance handle through a new type (odph_linux_thr_param_t). Process API calls were missing thread type selection. A params type decreases number of parameters needed (from 6 to 3 for pthreads) and reduces need for future function prototype changes (if e.g. new parameters need to be added). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-03-04api and linux-generic: make room for new apiChristophe Milard
This is about making the current structure clearer so that other interfaces can be added to ODP: The ODP API specification (platform agnostic) is moved from include/odp/api to include/odp/api/spec. The ODP API platform definition (for linux generic) is moved from platform/linux-generic/include/odp to platform/linux-generic/include/odp/api Include statements are adjusted accordinaly. This patch has been done by a script which is given with the cover-letter of this patch series. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>