Message ID | 1421275706-11176-5-git-send-email-anders.roxell@linaro.org |
---|---|
State | Accepted |
Commit | c8906ca2935a10344c256d930fbd90907295b804 |
Headers | show |
diff --git a/platform/linux-generic/include/api/odp_cpumask.h b/platform/linux-generic/include/api/odp_cpumask.h index 2e10c4e..0090f9a 100644 --- a/platform/linux-generic/include/api/odp_cpumask.h +++ b/platform/linux-generic/include/api/odp_cpumask.h @@ -127,6 +127,11 @@ int odp_cpumask_equal(const odp_cpumask_t *mask1, const odp_cpumask_t *mask2); /** + * Copy a CPU mask + */ +void odp_cpumask_copy(odp_cpumask_t *dest, const odp_cpumask_t *src); + +/** * @} */ diff --git a/platform/linux-generic/odp_cpumask.c b/platform/linux-generic/odp_cpumask.c index c15a971..6be7f1e 100644 --- a/platform/linux-generic/odp_cpumask.c +++ b/platform/linux-generic/odp_cpumask.c @@ -170,3 +170,8 @@ int odp_cpumask_equal(const odp_cpumask_t *mask1, { return CPU_EQUAL(&mask1->set, &mask2->set); } + +void odp_cpumask_copy(odp_cpumask_t *dest, const odp_cpumask_t *src) +{ + memcpy(&dest->set, &src->set, sizeof(src->set)); +}