diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2015-07-09 16:46:20 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-07-23 19:21:51 +0300 |
commit | 270af813121dd3ba67ce3ed082b49489c3c2dd35 (patch) | |
tree | ab8509f296dcb87036f730b704f7ca49955980d3 /helper/linux.c | |
parent | f97e134e3c599d03d56dd6a9820442374ef2f5a3 (diff) |
api: helper: deleted odph_linux_cpumask_default
The linux specific helper was replaced by default cpumask
calls (odp_cpumask_def_worker()) in the cpumask API.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Christophe Milard <christophe.milard@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
helper/linux.c
Diffstat (limited to 'helper/linux.c')
-rw-r--r-- | helper/linux.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/helper/linux.c b/helper/linux.c index a2eacc199..4256f4315 100644 --- a/helper/linux.c +++ b/helper/linux.c @@ -22,37 +22,6 @@ #include <odp/system_info.h> #include "odph_debug.h" -int odph_linux_cpumask_default(odp_cpumask_t *mask, int num) -{ - int ret, cpu, i; - cpu_set_t cpuset; - - ret = pthread_getaffinity_np(pthread_self(), - sizeof(cpu_set_t), &cpuset); - if (ret != 0) - ODPH_ABORT("failed to read CPU affinity value\n"); - - odp_cpumask_zero(mask); - - /* - * If no user supplied number or it's too large, then attempt - * to use all CPUs - */ - if (0 == num || CPU_SETSIZE < num) - num = CPU_COUNT(&cpuset); - - /* build the mask, allocating down from highest numbered CPU */ - for (cpu = 0, i = CPU_SETSIZE-1; i >= 0 && cpu < num; --i) { - if (CPU_ISSET(i, &cpuset)) { - odp_cpumask_set(mask, i); - cpu++; - } - } - - return cpu; -} - - static void *odp_run_start_routine(void *arg) { odp_start_args_t *start_args = arg; |