@@ -431,7 +431,7 @@ int main(int argc, char *argv[])
num_workers = args->cpu_count;
/* Get default worker cpumask */
- num_workers = odp_cpumask_def_worker(&cpumask, num_workers);
+ num_workers = odp_cpumask_default_worker(&cpumask, num_workers);
(void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr));
printf("num worker threads: %i\n", num_workers);
@@ -692,7 +692,7 @@ int main(int argc, char *argv[])
if (args->appl.cpu_count)
num_workers = args->appl.cpu_count;
- num_workers = odp_cpumask_def_worker(&cpumask, num_workers);
+ num_workers = odp_cpumask_default_worker(&cpumask, num_workers);
if (args->appl.mask) {
odp_cpumask_from_str(&cpumask, args->appl.mask);
num_workers = odp_cpumask_count(&cpumask);
@@ -918,7 +918,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args)
case 'c':
appl_args->mask = optarg;
odp_cpumask_from_str(&cpumask_args, args->appl.mask);
- num_workers = odp_cpumask_def_worker(&cpumask, 0);
+ num_workers = odp_cpumask_default_worker(&cpumask, 0);
odp_cpumask_and(&cpumask_and, &cpumask_args, &cpumask);
if (odp_cpumask_count(&cpumask_and) <
odp_cpumask_count(&cpumask_args)) {
@@ -1296,7 +1296,7 @@ main(int argc, char *argv[])
num_workers = args->appl.cpu_count;
/* Get default worker cpumask */
- num_workers = odp_cpumask_def_worker(&cpumask, num_workers);
+ num_workers = odp_cpumask_default_worker(&cpumask, num_workers);
(void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr));
printf("num worker threads: %i\n", num_workers);
@@ -386,7 +386,7 @@ int main(int argc, char *argv[])
num_workers = args->appl.cpu_count;
/* Get default worker cpumask */
- num_workers = odp_cpumask_def_worker(&cpumask, num_workers);
+ num_workers = odp_cpumask_default_worker(&cpumask, num_workers);
(void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr));
printf("num worker threads: %i\n", num_workers);
@@ -381,7 +381,7 @@ int main(int argc, char *argv[])
num_workers = gbls->args.cpu_count;
/* Get default worker cpumask */
- num_workers = odp_cpumask_def_worker(&cpumask, num_workers);
+ num_workers = odp_cpumask_default_worker(&cpumask, num_workers);
(void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr));
printf("num worker threads: %i\n", num_workers);
@@ -39,7 +39,7 @@ int main(int argc TEST_UNUSED, char *argv[] TEST_UNUSED)
}
/* discover how many processes this system can support */
- num_workers = odp_cpumask_def_worker(&cpu_mask, NUMBER_WORKERS);
+ num_workers = odp_cpumask_default_worker(&cpu_mask, NUMBER_WORKERS);
if (num_workers < NUMBER_WORKERS) {
printf("System can only support %d processes and not the %d requested\n",
num_workers, NUMBER_WORKERS);
@@ -40,7 +40,7 @@ int main(int argc TEST_UNUSED, char *argv[] TEST_UNUSED)
}
/* discover how many threads this system can support */
- num_workers = odp_cpumask_def_worker(&cpu_mask, NUMBER_WORKERS);
+ num_workers = odp_cpumask_default_worker(&cpu_mask, NUMBER_WORKERS);
if (num_workers < NUMBER_WORKERS) {
printf("System can only support %d threads and not the %d requested\n",
num_workers, NUMBER_WORKERS);
@@ -74,7 +74,7 @@ int odp_test_thread_create(void *func_ptr(void *), pthrd_arg *arg)
odp_cpumask_t cpumask;
/* Create and init additional threads */
- odp_cpumask_def_worker(&cpumask, arg->numthrds);
+ odp_cpumask_default_worker(&cpumask, arg->numthrds);
odph_linux_pthread_create(thread_tbl, &cpumask, func_ptr,
(void *)arg);
@@ -284,7 +284,7 @@ int odp_test_thread_create(void *func_ptr(void *), pthrd_arg *arg)
odp_cpumask_t cpumask;
/* Create and init additional threads */
- odp_cpumask_def_worker(&cpumask, arg->numthrds);
+ odp_cpumask_default_worker(&cpumask, arg->numthrds);
odph_linux_pthread_create(thread_tbl, &cpumask, func_ptr,
(void *)arg);
@@ -418,7 +418,7 @@ int main(int argc, char *argv[])
num_workers = gbl_args->appl.cpu_count;
/* Get default worker cpumask */
- num_workers = odp_cpumask_def_worker(&cpumask, num_workers);
+ num_workers = odp_cpumask_default_worker(&cpumask, num_workers);
(void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr));
printf("num worker threads: %i\n", num_workers);
@@ -544,8 +544,9 @@ static int setup_txrx_masks(odp_cpumask_t *thd_mask_tx,
int num_workers, num_tx_workers, num_rx_workers;
int i, cpu;
- num_workers = odp_cpumask_def_worker(&cpumask,
- gbl_args->args.cpu_count);
+ num_workers =
+ odp_cpumask_default_worker(&cpumask,
+ gbl_args->args.cpu_count);
if (num_workers < 2) {
LOG_ERR("Need at least two cores\n");
return -1;
@@ -891,7 +891,7 @@ int main(int argc, char *argv[])
num_workers = args.cpu_count;
/* Get default worker cpumask */
- num_workers = odp_cpumask_def_worker(&cpumask, num_workers);
+ num_workers = odp_cpumask_default_worker(&cpumask, num_workers);
(void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr));
printf("num worker threads: %i\n", num_workers);
@@ -28,7 +28,7 @@ int odp_cunit_thread_create(void *func_ptr(void *), pthrd_arg *arg)
odp_cpumask_t cpumask;
/* Create and init additional threads */
- odp_cpumask_def_worker(&cpumask, arg->numthrds);
+ odp_cpumask_default_worker(&cpumask, arg->numthrds);
return odph_linux_pthread_create(thread_tbl, &cpumask, func_ptr,
(void *)arg);
@@ -20,7 +20,7 @@ void cpumask_test_odp_cpumask_def_control(void)
unsigned max_cpus = mask_capacity();
odp_cpumask_t mask;
- num = odp_cpumask_def_control(&mask, ALL_AVAILABLE);
+ num = odp_cpumask_default_control(&mask, ALL_AVAILABLE);
mask_count = odp_cpumask_count(&mask);
CU_ASSERT(mask_count == num);
@@ -35,7 +35,7 @@ void cpumask_test_odp_cpumask_def_worker(void)
unsigned max_cpus = mask_capacity();
odp_cpumask_t mask;
- num = odp_cpumask_def_worker(&mask, ALL_AVAILABLE);
+ num = odp_cpumask_default_worker(&mask, ALL_AVAILABLE);
mask_count = odp_cpumask_count(&mask);
CU_ASSERT(mask_count == num);
@@ -59,11 +59,11 @@ void cpumask_test_odp_cpumask_def(void)
requested_cpus = available_cpus - 1;
else
requested_cpus = available_cpus;
- num_worker = odp_cpumask_def_worker(&mask, requested_cpus);
+ num_worker = odp_cpumask_default_worker(&mask, requested_cpus);
mask_count = odp_cpumask_count(&mask);
CU_ASSERT(mask_count == num_worker);
- num_control = odp_cpumask_def_control(&mask, 1);
+ num_control = odp_cpumask_default_control(&mask, 1);
mask_count = odp_cpumask_count(&mask);
CU_ASSERT(mask_count == num_control);
@@ -1017,7 +1017,7 @@ int scheduler_suite_init(void)
memset(globals, 0, sizeof(test_globals_t));
- globals->num_workers = odp_cpumask_def_worker(&mask, 0);
+ globals->num_workers = odp_cpumask_default_worker(&mask, 0);
if (globals->num_workers > MAX_WORKERS)
globals->num_workers = MAX_WORKERS;
@@ -1082,7 +1082,7 @@ int synchronizers_init(void)
global_mem->g_iterations = MAX_ITERATIONS;
global_mem->g_verbose = VERBOSE;
- workers_count = odp_cpumask_def_worker(&mask, 0);
+ workers_count = odp_cpumask_default_worker(&mask, 0);
max_threads = (workers_count >= MAX_WORKERS) ?
MAX_WORKERS : workers_count;
Do renames to odp_cpumask_default_worker and odp_cpumask_default_control. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- example/classifier/odp_classifier.c | 2 +- example/generator/odp_generator.c | 4 ++-- example/ipsec/odp_ipsec.c | 2 +- example/packet/odp_pktio.c | 2 +- example/timer/odp_timer_test.c | 2 +- helper/test/odp_process.c | 2 +- helper/test/odp_thread.c | 2 +- test/api_test/odp_common.c | 2 +- test/performance/odp_atomic.c | 2 +- test/performance/odp_l2fwd.c | 2 +- test/performance/odp_pktio_perf.c | 5 +++-- test/performance/odp_scheduling.c | 2 +- test/validation/common/odp_cunit_common.c | 2 +- test/validation/cpumask/cpumask.c | 8 ++++---- test/validation/scheduler/scheduler.c | 2 +- test/validation/synchronizers/synchronizers.c | 2 +- 16 files changed, 22 insertions(+), 21 deletions(-)