Change linux-generic implementation of rwlock_recursive types to
reference the externally visible ODP_CONFIG_THREADS symbol rather than
the internal _ODP_INTERNAL_MAX_THREADS symbol. This avoids causing
issues with installed copies of ODP that do not export internal symbols.

Signed-off-by: Bill Fischofer <[email protected]>
---
 platform/linux-generic/include/odp/plat/rwlock_recursive_types.h | 4 ++--
 platform/linux-generic/include/odp_config_internal.h             | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/platform/linux-generic/include/odp/plat/rwlock_recursive_types.h 
b/platform/linux-generic/include/odp/plat/rwlock_recursive_types.h
index d5bfb92..5989e26 100644
--- a/platform/linux-generic/include/odp/plat/rwlock_recursive_types.h
+++ b/platform/linux-generic/include/odp/plat/rwlock_recursive_types.h
@@ -19,14 +19,14 @@ extern "C" {
 
 #include <odp/rwlock.h>
 #include <odp/std_types.h>
-#include <odp_config_internal.h>
+#include <odp/config.h>
 
 /** @internal */
 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_INTERNAL_MAX_THREADS]; /**< read recursion count */
+       uint8_t  rd_cnt[ODP_CONFIG_THREADS];     /**< read recursion count */
 };
 
 typedef struct odp_rwlock_recursive_s odp_rwlock_recursive_t;
diff --git a/platform/linux-generic/include/odp_config_internal.h 
b/platform/linux-generic/include/odp_config_internal.h
index 4f20ff8..c484ce6 100644
--- a/platform/linux-generic/include/odp_config_internal.h
+++ b/platform/linux-generic/include/odp_config_internal.h
@@ -20,7 +20,7 @@ extern "C" {
 /**
  * Maximum number of threads
  */
-#define _ODP_INTERNAL_MAX_THREADS  128
+#define _ODP_INTERNAL_MAX_THREADS  ODP_CONFIG_THREADS
 
 #ifdef __cplusplus
 }
-- 
2.1.4

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to