@@ -24,11 +24,6 @@ extern "C" {
*/
/**
- * Maximum number of threads
- */
-#define ODP_CONFIG_MAX_THREADS 128
-
-/**
* Maximum number of pools
*/
#define ODP_CONFIG_POOLS 16
@@ -23,11 +23,12 @@ extern "C" {
*/
#include <odp/std_types.h>
+#include <odp_config_internal.h>
/**
* Minimum size of output buffer for odp_cpumask_to_str()
*/
-#define ODP_CPUMASK_STR_SIZE ((ODP_CONFIG_MAX_THREADS + 3) / 4 + 3)
+#define ODP_CPUMASK_STR_SIZE ((__ODP_CONFIG_MAX_THREADS + 3) / 4 + 3)
/**
* CPU mask
@@ -19,7 +19,7 @@ extern "C" {
#include <odp/rwlock.h>
#include <odp/std_types.h>
-#include <odp/config.h>
+#include <odp_config_internal.h>
/**
* @internal
@@ -29,7 +29,7 @@ struct odp_rwlock_recursive_s {
odp_rwlock_t lock; /**< the lock */
int wr_owner; /**< write owner thread */
uint32_t wr_cnt; /**< write recursion count */
- uint8_t rd_cnt[ODP_CONFIG_MAX_THREADS]; /**< read recursion count */
+ uint8_t rd_cnt[__ODP_CONFIG_MAX_THREADS]; /**< read recursion count */
};
/** @addtogroup odp_synchronizers
@@ -30,6 +30,7 @@ extern "C" {
#include <odp/thread.h>
#include <odp/event.h>
#include <odp_forward_typedefs_internal.h>
+#include <odp_config_internal.h>
#define ODP_BITSIZE(x) \
((x) <= 2 ? 1 : \
@@ -143,7 +144,7 @@ struct odp_buffer_hdr_t {
/** @internal Compile time assert that the
* allocator field can handle any allocator id*/
-_ODP_STATIC_ASSERT(INT16_MAX >= ODP_CONFIG_MAX_THREADS,
+_ODP_STATIC_ASSERT(INT16_MAX >= __ODP_CONFIG_MAX_THREADS,
"ODP_BUFFER_HDR_T__ALLOCATOR__SIZE_ERROR");
typedef struct odp_buffer_hdr_stride {
new file mode 100644
@@ -0,0 +1,29 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * Linux-generic platform internal configuration
+ */
+
+#ifndef ODP_INTERNAL_CONFIG_H_
+#define ODP_INTERNAL_CONFIG_H_
The file is named odp_config_internal so shouldn't this be ODP_CONFIG_INTERNAL_H_ ?
OK.
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Maximum number of threads
+ */