[Cbe-oss-dev] [PATCH 4/5]task: module api compatibility

Yuji Mano yuji.mano at am.sony.com
Wed Mar 25 12:48:25 EST 2009


This patch is for compatibility with the
base-workload-queue-module-api-update.patch.

Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>
---
 task/src/host/lib/task.c          |   12 ++++++------
 task/src/mpu/module/task_module.c |    2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

--- a/task/src/host/lib/task.c
+++ b/task/src/host/lib/task.c
@@ -187,7 +187,7 @@ int mars_task_create(struct mars_context
 	/* map task ELF */
 	ret = task_map_elf(task, elf_image);
 	if (ret != MARS_SUCCESS) {
-		mars_workload_queue_add_cancel(mars, workload_id);
+		mars_workload_queue_add_end(mars, workload_id, 1);
 		return ret;
 	}
 
@@ -210,7 +210,7 @@ int mars_task_create(struct mars_context
 					 context_save_size +
 					 MARS_TASK_REGISTER_SAVE_AREA_SIZE);
 		if (!task->context_save_area_ea) {
-			mars_workload_queue_add_cancel(mars, workload_id);
+			mars_workload_queue_add_end(mars, workload_id, 1);
 			return MARS_ERROR_MEMORY;
 		}
 	} else
@@ -221,10 +221,10 @@ int mars_task_create(struct mars_context
 	mars_ea_sync();
 
 	/* end process to add the task to the workload queue */
-	ret = mars_workload_queue_add_end(mars, workload_id);
+	ret = mars_workload_queue_add_end(mars, workload_id, 0);
 	if (ret != MARS_SUCCESS) {
 		mars_ea_free(task->context_save_area_ea);
-		mars_workload_queue_add_cancel(mars, workload_id);
+		mars_workload_queue_add_end(mars, workload_id, 1);
 		return ret;
 	}
 
@@ -273,7 +273,7 @@ int mars_task_destroy(const struct mars_
 	mars_ea_unmap(task->data_ea, task->data_size);
 
 	/* end process to remove the task from the workload queue */
-	ret = mars_workload_queue_remove_end(mars, id->workload_id);
+	ret = mars_workload_queue_remove_end(mars, id->workload_id, 0);
 	if (ret != MARS_SUCCESS)
 		return ret;
 
@@ -323,7 +323,7 @@ int mars_task_schedule(const struct mars
 	mars_ea_sync();
 
 	/* end process to schedule the workload in the workload queue */
-	ret = mars_workload_queue_schedule_end(mars, id->workload_id);
+	ret = mars_workload_queue_schedule_end(mars, id->workload_id, 0);
 	if (ret != MARS_SUCCESS)
 		return ret;
 
--- a/task/src/mpu/module/task_module.c
+++ b/task/src/mpu/module/task_module.c
@@ -200,7 +200,7 @@ static int task_schedule(uint16_t worklo
 		schedule_task->args = *args;
 
 	/* end process to schedule the workload in the workload queue */
-	return mars_module_workload_schedule_end(workload_id);
+	return mars_module_workload_schedule_end(workload_id, 0);
 }
 
 static int task_wait(uint16_t workload_id, void *task_heap)





More information about the cbe-oss-dev mailing list