[Cbe-oss-dev] [PATCH 01/22]MARS/base: workload query api

Yuji Mano yuji.mano at am.sony.com
Fri Mar 20 07:53:40 EST 2009


This patch updates the task module for compability with changes in the base
library mars_module_workload_query macros.

Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>
---
 task/src/mpu/module/task_module.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

--- a/task/src/mpu/module/task_module.c
+++ b/task/src/mpu/module/task_module.c
@@ -193,11 +193,13 @@ 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_query(workload_id, MARS_QUERY_IS_INITIALIZED))
+	if (!mars_module_workload_query(workload_id,
+					MARS_WORKLOAD_QUERY_IS_INITIALIZED))
 		return MARS_ERROR_STATE;
 
 	/* if workload not finished return busy */
-	if (!mars_module_workload_query(workload_id, MARS_QUERY_IS_FINISHED))
+	if (!mars_module_workload_query(workload_id,
+					MARS_WORKLOAD_QUERY_IS_FINISHED))
 		return MARS_ERROR_BUSY;
 
 	return mars_module_workload_wait_reset();
@@ -224,7 +226,7 @@ static int task_signal_try_wait(void)
 {
 	/* if signal not yet received return busy */
 	if (!mars_module_workload_query(mars_module_get_workload_id(),
-					MARS_QUERY_IS_SIGNAL_SET))
+					MARS_WORKLOAD_QUERY_IS_SIGNAL_SET))
 		return MARS_ERROR_BUSY;
 
 	return mars_module_workload_signal_reset();
@@ -289,7 +291,7 @@ void __module_main(void)
 
 	/* check if task context is cached in mpu storage */
 	task_cached = mars_module_workload_query(mars_module_get_workload_id(),
-						 MARS_QUERY_IS_CACHED);
+					MARS_WORKLOAD_QUERY_IS_CONTEXT_CACHED);
 
 	/* only reload the readonly text segment if different from cached */
 	if (!task_cached)






More information about the cbe-oss-dev mailing list