aboutsummaryrefslogtreecommitdiff
path: root/test/validation/api/thread
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2018-10-15 15:27:11 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-11-28 17:16:39 +0300
commitdbaed696a6409093dc9d387c8ea946362b6ce212 (patch)
treee04f50d3968281db31d61397cc3df5453140092b /test/validation/api/thread
parenta4d92554bdb13f7aa3a1ab2ef212f080d5b5abcd (diff)
validation: use use mem_model from helper options
Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test/validation/api/thread')
-rw-r--r--test/validation/api/thread/thread.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/validation/api/thread/thread.c b/test/validation/api/thread/thread.c
index d977f977a..7b40cda62 100644
--- a/test/validation/api/thread/thread.c
+++ b/test/validation/api/thread/thread.c
@@ -7,6 +7,7 @@
#include "config.h"
#include <odp_api.h>
+#include <odp/helper/odph_api.h>
#include <odp_cunit_common.h>
#include <mask_common.h>
#include <test_debug.h>
@@ -24,8 +25,18 @@ static global_shared_mem_t *global_mem;
static int thread_global_init(odp_instance_t *inst)
{
odp_shm_t global_shm;
+ odp_init_t init_param;
+ odph_helper_options_t helper_options;
- if (0 != odp_init_global(inst, NULL, NULL)) {
+ if (odph_options(&helper_options)) {
+ fprintf(stderr, "error: odph_options() failed.\n");
+ return -1;
+ }
+
+ odp_init_param_init(&init_param);
+ init_param.mem_model = helper_options.mem_model;
+
+ if (0 != odp_init_global(inst, &init_param, NULL)) {
fprintf(stderr, "error: odp_init_global() failed.\n");
return -1;
}