diff mbox

[PATCHv3,07/10] linux-generic: tm: check for proper init of tm_system_thread

Message ID 1464306409-7325-8-git-send-email-bill.fischofer@linaro.org
State Accepted
Commit 26f1bf5179b79714c1454a4c238fe4bd43a596c8
Headers show

Commit Message

Bill Fischofer May 26, 2016, 11:46 p.m. UTC
Add an RC check for odp_init_local() to ensure that
tm_system_thread() is launched properly.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 platform/linux-generic/odp_traffic_mngr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c
index fff1c35..72f9493 100644
--- a/platform/linux-generic/odp_traffic_mngr.c
+++ b/platform/linux-generic/odp_traffic_mngr.c
@@ -2280,7 +2280,8 @@  static void *tm_system_thread(void *arg)
 	uint32_t destroying, work_queue_cnt, timer_cnt;
 	int rc;
 
-	odp_init_local(INSTANCE_ID, ODP_THREAD_WORKER);
+	rc = odp_init_local(INSTANCE_ID, ODP_THREAD_WORKER);
+	ODP_ASSERT(rc == 0);
 	tm_system = arg;
 	_odp_int_timer_wheel = tm_system->_odp_int_timer_wheel;
 	input_work_queue = tm_system->input_work_queue;