diff options
author | Zoltan Kiss <zoltan.kiss@linaro.org> | 2015-11-04 14:48:33 +0000 |
---|---|---|
committer | Zoltan Kiss <zoltan.kiss@linaro.org> | 2015-11-04 14:48:33 +0000 |
commit | 52d79a73a9472b50ee3c3e4b133fa095fa154b73 (patch) | |
tree | 0ead635b89876e5a175039ac49d53d345baf91df /platform/linux-dpdk | |
parent | b29e5df8df2d08e51542a39da27e58bb03ecbf8e (diff) |
Port e51f4f01 "api: config: removed ODP_CONFIG_MAX_THREADS"
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Diffstat (limited to 'platform/linux-dpdk')
-rw-r--r-- | platform/linux-dpdk/odp_thread.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/platform/linux-dpdk/odp_thread.c b/platform/linux-dpdk/odp_thread.c index 07b17a4fe..fc4135a82 100644 --- a/platform/linux-dpdk/odp_thread.c +++ b/platform/linux-dpdk/odp_thread.c @@ -18,13 +18,14 @@ #include <odp/shared_memory.h> #include <odp/align.h> #include <odp/cpu.h> +#include <odp_config_internal.h> #include <rte_lcore.h> #include <string.h> #include <stdio.h> #include <stdlib.h> -#define MASK_SIZE_16 ((ODP_CONFIG_MAX_THREADS+15)/16) +#define MASK_SIZE_16 ((_ODP_INTERNAL_MAX_THREADS+15)/16) typedef struct { int thr; @@ -34,7 +35,7 @@ typedef struct { typedef struct { - thread_state_t thr[ODP_CONFIG_MAX_THREADS]; + thread_state_t thr[_ODP_INTERNAL_MAX_THREADS]; union { /* struct order must be kept in sync with schedule_types.h */ struct { @@ -104,10 +105,10 @@ static int alloc_id(odp_thread_type_t type) int thr; odp_thrmask_t *all = &thread_globals->all; - if (thread_globals->num >= ODP_CONFIG_MAX_THREADS) + if (thread_globals->num >= _ODP_INTERNAL_MAX_THREADS) return -1; - for (thr = 0; thr < ODP_CONFIG_MAX_THREADS; thr++) { + for (thr = 0; thr < _ODP_INTERNAL_MAX_THREADS; thr++) { if (odp_thrmask_isset(all, thr) == 0) { odp_thrmask_set(all, thr); @@ -131,7 +132,7 @@ static int free_id(int thr) { odp_thrmask_t *all = &thread_globals->all; - if (thr < 0 || thr >= ODP_CONFIG_MAX_THREADS) + if (thr < 0 || thr >= _ODP_INTERNAL_MAX_THREADS) return -1; if (odp_thrmask_isset(all, thr) == 0) |