aboutsummaryrefslogtreecommitdiff
path: root/test/performance
diff options
context:
space:
mode:
authorOla Liljedahl <ola.liljedahl@linaro.org>2015-02-04 22:07:23 +0100
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-02-05 16:19:55 +0300
commit9208c4039548cf38c3b204094c1781b7e71f9ce3 (patch)
tree4f944b3029f1096e919381a7392f584cc448cfcd /test/performance
parent73d8c49472a866f761a2d6615d309ff4c129655d (diff)
api: odp_cpumask.h: odp_cpumask_to_str() return chars written or error
Add define ODP_CPUMASK_STR_SIZE for minimum output buffer size for odp_cpumask_to_str(). odp_cpumask_to_str() takes output buffer size as input and returns number of chars written (on success), <0 on failure. Updated the implementation. Updated all usages in example and test programs. Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test/performance')
-rw-r--r--test/performance/odp_scheduling.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c
index 98c060e6c..46af479e7 100644
--- a/test/performance/odp_scheduling.c
+++ b/test/performance/odp_scheduling.c
@@ -832,7 +832,7 @@ int main(int argc, char *argv[])
int prios;
odp_shm_t shm;
test_globals_t *globals;
- char cpumaskstr[64];
+ char cpumaskstr[ODP_CPUMASK_STR_SIZE];
odp_pool_param_t params;
printf("\nODP example starts\n\n");
@@ -883,7 +883,7 @@ int main(int argc, char *argv[])
* Start mapping thread from CPU #1
*/
num_workers = odph_linux_cpumask_default(&cpumask, num_workers);
- odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr));
+ (void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr));
printf("num worker threads: %i\n", num_workers);
printf("first CPU: %i\n", odp_cpumask_first(&cpumask));