[API-NEXT] example: generator: add missing instance set

Message ID 1458726491-4728-1-git-send-email-maxim.uvarov@linaro.org
State New
Headers show

Commit Message

Maxim Uvarov March 23, 2016, 9:48 a.m.
Patch: api: init: add instance handle
adds instance id, but for generator one branch of threads start
is missing which lead to failure of odp_init_global(). Add missing
instance id and initial missing structure initialization to zero.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
 I was harry to apply instance handle patch. That tiny fix is really needed.


 example/generator/odp_generator.c | 2 ++
 1 file changed, 2 insertions(+)


diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index 8f69c9c..3e4ca6b 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -836,8 +836,10 @@  int main(int argc, char *argv[])
 			odp_cpumask_set(&thd_mask, cpu);
+			memset(&thr_params, 0, sizeof(thr_params));
 			thr_params.start = thr_run_func;
 			thr_params.arg   = &args->thread[i];
+			thr_params.instance = instance;
 						  &thd_mask, &thr_params);