diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2015-11-20 14:32:42 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-12-29 14:07:50 +0300 |
commit | da9cde9aa543ba7b435b46d791821c3692f6c853 (patch) | |
tree | 809c16fc4283bc985d674820bce4932f5fa385b8 /platform | |
parent | 6e889a95f33392d4c032c793c8f472e2b77c46ba (diff) |
api: thread: added THREAD_COUNT_MAX define
Added maximum thread count define to enable static memory allocation.
The API call returns dynamic maximum. Static and dynamic may be different
application is build for binary compatibility.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform')
-rw-r--r-- | platform/linux-generic/Makefile.am | 1 | ||||
-rw-r--r-- | platform/linux-generic/include/odp/plat/thread_types.h | 34 | ||||
-rw-r--r-- | platform/linux-generic/include/odp/thread.h | 8 |
3 files changed, 36 insertions, 7 deletions
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 4639ebcc0..a0de35b03 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -68,6 +68,7 @@ odpplatinclude_HEADERS = \ $(srcdir)/include/odp/plat/shared_memory_types.h \ $(srcdir)/include/odp/plat/spinlock_types.h \ $(srcdir)/include/odp/plat/strong_types.h \ + $(srcdir)/include/odp/plat/thread_types.h \ $(srcdir)/include/odp/plat/thrmask_types.h \ $(srcdir)/include/odp/plat/ticketlock_types.h \ $(srcdir)/include/odp/plat/time_types.h \ diff --git a/platform/linux-generic/include/odp/plat/thread_types.h b/platform/linux-generic/include/odp/plat/thread_types.h new file mode 100644 index 000000000..33af45983 --- /dev/null +++ b/platform/linux-generic/include/odp/plat/thread_types.h @@ -0,0 +1,34 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP thread + */ + +#ifndef ODP_THREAD_TYPES_H_ +#define ODP_THREAD_TYPES_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup odp_thread + * @{ + */ + +#define ODP_THREAD_COUNT_MAX 128 + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/include/odp/thread.h b/platform/linux-generic/include/odp/thread.h index e5215852a..522ca2599 100644 --- a/platform/linux-generic/include/odp/thread.h +++ b/platform/linux-generic/include/odp/thread.h @@ -17,13 +17,7 @@ extern "C" { #endif -/** @ingroup odp_thread ODP THREAD - * @{ - */ - -/** - * @} - */ +#include <odp/plat/thread_types.h> #include <odp/api/thread.h> |