diff mbox

[PATCHv7,28/35] example: time: adding helper cmd line parsing

Message ID 1463490282-23277-29-git-send-email-christophe.milard@linaro.org
State Superseded
Headers show

Commit Message

Christophe Milard May 17, 2016, 1:04 p.m. UTC
time now calls the helper command line parsing so that helper
can collect its options. Hence enabling process mode run.

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 example/time/time_global_test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/example/time/time_global_test.c b/example/time/time_global_test.c
index df4da4e..372d96b 100644
--- a/example/time/time_global_test.c
+++ b/example/time/time_global_test.c
@@ -241,7 +241,7 @@  static int run_thread(void *ptr)
 	return 0;
 }
 
-int main(void)
+int main(int argc, char *argv[])
 {
 	int err = 0;
 	odp_pool_t pool = ODP_POOL_INVALID;
@@ -256,6 +256,9 @@  int main(void)
 	odp_instance_t instance;
 	odph_odpthread_params_t thr_params;
 
+	/* let helper collect its own arguments (e.g. --odph_proc) */
+	odph_parse_options(argc, argv, NULL, NULL);
+
 	printf("\nODP global time test starts\n");
 
 	if (odp_init_global(&instance, NULL, NULL)) {