[Cbe-oss-dev] [PATCH 14/22]MARS/task: Module api combine compatibility

Yuji Mano yuji.mano at am.sony.com
Wed Jan 21 11:29:29 EST 2009


Update task module implementation to be compatible with module api cleanup.

Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>

---
 task/src/mpu/module/task_module.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/task/src/mpu/module/task_module.c
+++ b/task/src/mpu/module/task_module.c
@@ -360,7 +360,7 @@ static int task_wait(uint16_t workload_i
 	int ret;
 
 	/* make sure workload is initialized */
-	if (!mars_module_workload_is_initialized(workload_id))
+	if (!mars_module_workload_query(workload_id, MARS_QUERY_IS_INITIALIZED))
 		return MARS_ERROR_STATE;
 
 	ret = mars_module_workload_wait_set(workload_id);
@@ -375,11 +375,11 @@ static int task_wait(uint16_t workload_i
 static int task_try_wait(uint16_t workload_id)
 {
 	/* make sure workload is initialized */
-	if (!mars_module_workload_is_initialized(workload_id))
+	if (!mars_module_workload_query(workload_id, MARS_QUERY_IS_INITIALIZED))
 		return MARS_ERROR_STATE;
 
 	/* if workload not finished return busy */
-	if (!mars_module_workload_is_finished(workload_id))
+	if (!mars_module_workload_query(workload_id, MARS_QUERY_IS_FINISHED))
 		return MARS_ERROR_BUSY;
 
 	return mars_module_workload_wait_reset();
@@ -400,7 +400,8 @@ static int task_signal_wait(void)
 static int task_signal_try_wait(void)
 {
 	/* if signal not yet received return busy */
-	if (!mars_module_workload_is_signal_set(mars_module_get_workload_id()))
+	if (!mars_module_workload_query(mars_module_get_workload_id(),
+					MARS_QUERY_IS_SIGNAL_SET))
 		return MARS_ERROR_BUSY;
 
 	return mars_module_workload_signal_reset();






More information about the cbe-oss-dev mailing list