[Cbe-oss-dev] [PATCH 01/10]MARS/core: Workload queue internal api change

Yuji Mano yuji.mano at am.sony.com
Fri Nov 21 11:06:30 EST 2008


This changes the internal workload queue API so that a MARS context pointer is
passed in rather than a MARS workload queue pointer. This allows both the MARS
context and workload queue definitions to be hidden from the public headers for
when the workload queue API is made public in preparation for the workload
module aplit.

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

---
 core/src/host/lib/context.c         |    8 +-
 core/src/host/lib/task.c            |   26 ++----
 core/src/host/lib/task_event_flag.c |    2 
 core/src/host/lib/task_queue.c      |    9 --
 core/src/host/lib/task_signal.c     |    3 
 core/src/host/lib/workload_queue.c  |  144 +++++++++++++++++++++++++++---------
 core/src/host/lib/workload_queue.h  |   32 ++++----
 7 files changed, 148 insertions(+), 76 deletions(-)

--- a/core/src/host/lib/context.c
+++ b/core/src/host/lib/context.c
@@ -138,7 +138,7 @@ static int mpu_contexts_destroy(struct m
 	unsigned int i;
 
 	/* shutdown the workload queue so mpu context threads exit */
-	ret = mars_workload_queue_exit(mars->workload_queue);
+	ret = mars_workload_queue_exit(mars);
 	if (ret != MARS_SUCCESS)
 		return ret;
 
@@ -227,7 +227,7 @@ int mars_context_create(struct mars_cont
 	}
 
 	/* create workload queue */
-	ret = mars_workload_queue_create(&mars->workload_queue);
+	ret = mars_workload_queue_create(mars);
 	if (ret != MARS_SUCCESS)
 		goto error_workload_queue_create;
 
@@ -256,7 +256,7 @@ done:
 error_pthread_mutex_unlock:
 	mpu_contexts_destroy(mars);
 error_mpu_contexts_create:
-	mars_workload_queue_destroy(mars->workload_queue);
+	mars_workload_queue_destroy(mars);
 error_workload_queue_create:
 	mars_free(mars->mpu_context_threads);
 error_malloc_mpu_context_threads:
@@ -298,7 +298,7 @@ int mars_context_destroy(struct mars_con
 
 	/* destroy workload queue */
 	if (mars->workload_queue) {
-		ret = mars_workload_queue_destroy(mars->workload_queue);
+		ret = mars_workload_queue_destroy(mars);
 		if (ret != MARS_SUCCESS)
 			goto error;
 	}
--- a/core/src/host/lib/task.c
+++ b/core/src/host/lib/task.c
@@ -88,7 +88,7 @@ int mars_task_create(struct mars_context
 		return MARS_ERROR_FORMAT;
 
 	/* begin process to add the task to the workload queue */
-	ret = mars_workload_queue_add_begin(mars->workload_queue, &workload_id,
+	ret = mars_workload_queue_add_begin(mars, &workload_id,
 		MARS_WORKLOAD_TYPE_TASK, &workload);
 	if (ret != MARS_SUCCESS)
 		return ret;
@@ -158,7 +158,7 @@ int mars_task_create(struct mars_context
 
 done:
 	/* end process to add the task to the workload queue */
-	ret = mars_workload_queue_add_end(mars->workload_queue, workload_id);
+	ret = mars_workload_queue_add_end(mars, workload_id);
 	if (ret != MARS_SUCCESS)
 		goto error_workload_queue_add_end;
 
@@ -173,7 +173,7 @@ error_malloc_context_save_area:
 	mars_ea_free(mars_ea_to_ptr(task->context_save_unit_ea));
 error_malloc_context_save_unit:
 error_context_save_unit_addr_align:
-	mars_workload_queue_add_cancel(mars->workload_queue, workload_id);
+	mars_workload_queue_add_cancel(mars, workload_id);
 
 	return ret;
 }
@@ -197,8 +197,8 @@ int mars_task_destroy(struct mars_task_i
 	mars = mars_ea_to_ptr(id->mars_context_ea);
 
 	/* begin process to remove the task from the workload queue */
-	ret = mars_workload_queue_remove_begin(mars->workload_queue,
-		id->workload_id, &workload);
+	ret = mars_workload_queue_remove_begin(mars, id->workload_id,
+		&workload);
 	if (ret != MARS_SUCCESS)
 		return ret;
 
@@ -214,8 +214,7 @@ int mars_task_destroy(struct mars_task_i
 		mars_ea_free(mars_ea_to_ptr(task->context_save_unit_ea));
 
 	/* end process to remove the task from the workload queue */
-	ret = mars_workload_queue_remove_end(mars->workload_queue,
-		id->workload_id);
+	ret = mars_workload_queue_remove_end(mars, id->workload_id);
 	if (ret != MARS_SUCCESS)
 		return ret;
 
@@ -242,8 +241,8 @@ int mars_task_schedule(struct mars_task_
 	mars = mars_ea_to_ptr(id->mars_context_ea);
 
 	/* begin process to schedule the workload in the workload queue */
-	ret = mars_workload_queue_schedule_begin(mars->workload_queue,
-		id->workload_id, priority, &workload);
+	ret = mars_workload_queue_schedule_begin(mars, id->workload_id,
+		priority, &workload);
 	if (ret != MARS_SUCCESS)
 		return ret;
 
@@ -256,8 +255,7 @@ int mars_task_schedule(struct mars_task_
 		memcpy(&task->args, args, sizeof(struct mars_task_args));
 
 	/* end process to schedule the workload in the workload queue */
-	ret = mars_workload_queue_schedule_end(mars->workload_queue,
-		id->workload_id);
+	ret = mars_workload_queue_schedule_end(mars, id->workload_id);
 	if (ret != MARS_SUCCESS)
 		return ret;
 
@@ -283,8 +281,7 @@ int mars_task_wait(struct mars_task_id *
 	mars = mars_ea_to_ptr(id->mars_context_ea);
 
 	/* blocking wait for workload completion */
-	ret = mars_workload_queue_wait(mars->workload_queue, id->workload_id,
-		&workload);
+	ret = mars_workload_queue_wait(mars, id->workload_id, &workload);
 	if (ret != MARS_SUCCESS)
 		return ret;
 
@@ -317,8 +314,7 @@ int mars_task_try_wait(struct mars_task_
 	mars = mars_ea_to_ptr(id->mars_context_ea);
 
 	/* non-blocking wait for workload completion */
-	ret = mars_workload_queue_try_wait(mars->workload_queue,
-		id->workload_id, &workload);
+	ret = mars_workload_queue_try_wait(mars, id->workload_id, &workload);
 	if (ret != MARS_SUCCESS)
 		return ret;
 
--- a/core/src/host/lib/task_event_flag.c
+++ b/core/src/host/lib/task_event_flag.c
@@ -158,7 +158,7 @@ int mars_task_event_flag_set(struct mars
 		}
 
 		/* signal the task to go to ready state */
-		ret = mars_workload_queue_signal_send(mars->workload_queue,
+		ret = mars_workload_queue_signal_send(mars,
 			event_flag->wait_id[i]);
 		if (ret != MARS_SUCCESS)
 			return ret;
--- a/core/src/host/lib/task_queue.c
+++ b/core/src/host/lib/task_queue.c
@@ -152,8 +152,7 @@ int mars_task_queue_clear(struct mars_ta
 
 	/* signal all waiting tasks that queue is ready for push */
 	for (i = 0; i < queue->push_wait_count; i++)
-		mars_workload_queue_signal_send(mars->workload_queue,
-			queue->push_wait_id[0]);
+		mars_workload_queue_signal_send(mars, queue->push_wait_id[0]);
 
 	/* flush all ids from push wait list */
 	queue->push_wait_count = 0;
@@ -175,8 +174,7 @@ static void push_update(struct mars_task
 	/* signal waiting task that queue is ready for pop */
 	if (queue->pop_wait_count) {
 		/* signal waiting task */
-		mars_workload_queue_signal_send(mars->workload_queue,
-			queue->pop_wait_id[0]);
+		mars_workload_queue_signal_send(mars, queue->pop_wait_id[0]);
 
 		/* flush id from pop wait list */
 		queue->pop_wait_count--;
@@ -249,8 +247,7 @@ static void pop_update(struct mars_task_
 	/* signal waiting task that queue is ready for push */
 	if (queue->push_wait_count) {
 		/* signal waiting task */
-		mars_workload_queue_signal_send(mars->workload_queue,
-			queue->push_wait_id[0]);
+		mars_workload_queue_signal_send(mars, queue->push_wait_id[0]);
 
 		/* flush id from push wait list */
 		queue->push_wait_count--;
--- a/core/src/host/lib/task_signal.c
+++ b/core/src/host/lib/task_signal.c
@@ -57,8 +57,7 @@ int mars_task_signal_send(struct mars_ta
 		return MARS_ERROR_PARAMS;
 
 	/* send signal to workload */
-	ret = mars_workload_queue_signal_send(mars->workload_queue,
-		id->workload_id);
+	ret = mars_workload_queue_signal_send(mars, id->workload_id);
 	if (ret != MARS_SUCCESS)
 		return ret;
 
--- a/core/src/host/lib/workload_queue.c
+++ b/core/src/host/lib/workload_queue.c
@@ -43,19 +43,23 @@
 #include "mars/mutex.h"
 #include "mars/error.h"
 
+#include "context_internal_types.h"
 #include "mutex_internal_types.h"
 #include "kernel_internal_types.h"
+#include "workload_internal_types.h"
 #include "workload_queue.h"
 
-int mars_workload_queue_create(struct mars_workload_queue **queue_ret)
+int mars_workload_queue_create(struct mars_context *mars)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
-	struct mars_workload_queue *queue;
 
 	/* check function params */
-	if (!queue_ret)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (mars->workload_queue)
+		return MARS_ERROR_STATE;
 
 	/* allocate workload instance */
 	queue = (struct mars_workload_queue *)mars_ea_memalign(
@@ -90,21 +94,26 @@ int mars_workload_queue_create(struct ma
 		}
 	}
 
-	/* return workload queue instance */
-	*queue_ret = queue;
+	/* set the workload queue instance in the mars context */
+	mars->workload_queue = queue;
 
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_destroy(struct mars_workload_queue *queue)
+int mars_workload_queue_destroy(struct mars_context *mars)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 	uint16_t id = 0;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
+
+	queue = mars->workload_queue;
 
 	/* check for any tasks left in workload queue */
 	while (id < MARS_WORKLOAD_MAX) {
@@ -121,36 +130,50 @@ int mars_workload_queue_destroy(struct m
 	/* free workload queue instance */
 	mars_ea_free(queue);
 
+	/* set the workload queue to NULL for error checking */
+	mars->workload_queue = NULL;
+
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_exit(struct mars_workload_queue *queue)
+int mars_workload_queue_exit(struct mars_context *mars)
 {
+	struct mars_workload_queue *queue;
+
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
+
+	queue = mars->workload_queue;
 
 	queue->header.flag = MARS_WORKLOAD_QUEUE_FLAG_EXIT;
 
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_add_begin(struct mars_workload_queue *queue,
+int mars_workload_queue_add_begin(struct mars_context *mars,
 				uint16_t *id, uint8_t type,
 				struct mars_workload_context **workload)
 {
+	struct mars_workload_queue *queue;
 	int block = 0;
 	int index = 0;
 	uint64_t *bits;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (!id)
 		return MARS_ERROR_NULL;
 	if (type != MARS_WORKLOAD_TYPE_TASK)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	mars_mutex_lock((struct mars_mutex *)&queue->block[block]);
 
 	/* get bits from workload queue block */
@@ -196,19 +219,24 @@ int mars_workload_queue_add_begin(struct
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_add_end(struct mars_workload_queue *queue,
+int mars_workload_queue_add_end(struct mars_context *mars,
 				uint16_t id)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 	uint64_t *bits;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (id >= MARS_WORKLOAD_MAX)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	/* calculate block/index from id */
 	block = id / MARS_WORKLOAD_PER_BLOCK;
 	index = id % MARS_WORKLOAD_PER_BLOCK;
@@ -232,18 +260,23 @@ int mars_workload_queue_add_end(struct m
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_add_cancel(struct mars_workload_queue *queue,
+int mars_workload_queue_add_cancel(struct mars_context *mars,
 				uint16_t id)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (id >= MARS_WORKLOAD_MAX)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	/* calculate block/index from id */
 	block = id / MARS_WORKLOAD_PER_BLOCK;
 	index = id % MARS_WORKLOAD_PER_BLOCK;
@@ -266,19 +299,24 @@ int mars_workload_queue_add_cancel(struc
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_remove_begin(struct mars_workload_queue *queue,
+int mars_workload_queue_remove_begin(struct mars_context *mars,
 				uint16_t id,
 				struct mars_workload_context **workload)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (id >= MARS_WORKLOAD_MAX)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	/* calculate block/index from id */
 	block = id / MARS_WORKLOAD_PER_BLOCK;
 	index = id % MARS_WORKLOAD_PER_BLOCK;
@@ -305,18 +343,23 @@ int mars_workload_queue_remove_begin(str
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_remove_end(struct mars_workload_queue *queue,
+int mars_workload_queue_remove_end(struct mars_context *mars,
 				uint16_t id)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (id >= MARS_WORKLOAD_MAX)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	/* calculate block/index from id */
 	block = id / MARS_WORKLOAD_PER_BLOCK;
 	index = id % MARS_WORKLOAD_PER_BLOCK;
@@ -339,18 +382,23 @@ int mars_workload_queue_remove_end(struc
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_remove_cancel(struct mars_workload_queue *queue,
+int mars_workload_queue_remove_cancel(struct mars_context *mars,
 				uint16_t id)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (id >= MARS_WORKLOAD_MAX)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	/* calculate block/index from id */
 	block = id / MARS_WORKLOAD_PER_BLOCK;
 	index = id % MARS_WORKLOAD_PER_BLOCK;
@@ -373,19 +421,24 @@ int mars_workload_queue_remove_cancel(st
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_schedule_begin(struct mars_workload_queue *queue,
+int mars_workload_queue_schedule_begin(struct mars_context *mars,
 				uint16_t id, uint8_t priority,
 				struct mars_workload_context **workload)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (id >= MARS_WORKLOAD_MAX)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	/* calculate block/index from id */
 	block = id / MARS_WORKLOAD_PER_BLOCK;
 	index = id % MARS_WORKLOAD_PER_BLOCK;
@@ -420,18 +473,23 @@ int mars_workload_queue_schedule_begin(s
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_schedule_end(struct mars_workload_queue *queue,
+int mars_workload_queue_schedule_end(struct mars_context *mars,
 				uint16_t id)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (id >= MARS_WORKLOAD_MAX)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	/* calculate block/index from id */
 	block = id / MARS_WORKLOAD_PER_BLOCK;
 	index = id % MARS_WORKLOAD_PER_BLOCK;
@@ -454,18 +512,23 @@ int mars_workload_queue_schedule_end(str
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_schedule_cancel(struct mars_workload_queue *queue,
+int mars_workload_queue_schedule_cancel(struct mars_context *mars,
 				uint16_t id)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (id >= MARS_WORKLOAD_MAX)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	/* calculate block/index from id */
 	block = id / MARS_WORKLOAD_PER_BLOCK;
 	index = id % MARS_WORKLOAD_PER_BLOCK;
@@ -488,19 +551,24 @@ int mars_workload_queue_schedule_cancel(
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_wait(struct mars_workload_queue *queue,
+int mars_workload_queue_wait(struct mars_context *mars,
 				uint16_t id,
 				struct mars_workload_context **workload)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (id >= MARS_WORKLOAD_MAX)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	/* calculate block/index from id */
 	block = id / MARS_WORKLOAD_PER_BLOCK;
 	index = id % MARS_WORKLOAD_PER_BLOCK;
@@ -521,19 +589,24 @@ int mars_workload_queue_wait(struct mars
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_try_wait(struct mars_workload_queue *queue,
+int mars_workload_queue_try_wait(struct mars_context *mars,
 				uint16_t id,
 				struct mars_workload_context **workload)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (id >= MARS_WORKLOAD_MAX)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	/* calculate block/index from id */
 	block = id / MARS_WORKLOAD_PER_BLOCK;
 	index = id % MARS_WORKLOAD_PER_BLOCK;
@@ -555,18 +628,23 @@ int mars_workload_queue_try_wait(struct 
 	return MARS_SUCCESS;
 }
 
-int mars_workload_queue_signal_send(struct mars_workload_queue *queue,
+int mars_workload_queue_signal_send(struct mars_context *mars,
 				uint16_t id)
 {
+	struct mars_workload_queue *queue;
 	int block;
 	int index;
 
 	/* check function params */
-	if (!queue)
+	if (!mars)
 		return MARS_ERROR_NULL;
+	if (!mars->workload_queue)
+		return MARS_ERROR_STATE;
 	if (id >= MARS_WORKLOAD_MAX)
 		return MARS_ERROR_PARAMS;
 
+	queue = mars->workload_queue;
+
 	/* calculate block/index from id */
 	block = id / MARS_WORKLOAD_PER_BLOCK;
 	index = id % MARS_WORKLOAD_PER_BLOCK;
--- a/core/src/host/lib/workload_queue.h
+++ b/core/src/host/lib/workload_queue.h
@@ -40,45 +40,47 @@
 
 #include "workload_internal_types.h"
 
+struct mars_context;
+
 #if defined(__cplusplus)
 extern "C" {
 #endif
 
-int mars_workload_queue_create(struct mars_workload_queue **queue);
-int mars_workload_queue_destroy(struct mars_workload_queue *queue);
-int mars_workload_queue_exit(struct mars_workload_queue *queue);
+int mars_workload_queue_create(struct mars_context *mars);
+int mars_workload_queue_destroy(struct mars_context *mars);
+int mars_workload_queue_exit(struct mars_context *mars);
 
-int mars_workload_queue_add_begin(struct mars_workload_queue *queue,
+int mars_workload_queue_add_begin(struct mars_context *mars,
 				uint16_t *id, uint8_t type,
 				struct mars_workload_context **workload);
-int mars_workload_queue_add_end(struct mars_workload_queue *queue,
+int mars_workload_queue_add_end(struct mars_context *mars,
 				uint16_t id);
-int mars_workload_queue_add_cancel(struct mars_workload_queue *queue,
+int mars_workload_queue_add_cancel(struct mars_context *mars,
 				uint16_t id);
 
-int mars_workload_queue_remove_begin(struct mars_workload_queue *queue,
+int mars_workload_queue_remove_begin(struct mars_context *mars,
 				uint16_t id,
 				struct mars_workload_context **workload);
-int mars_workload_queue_remove_end(struct mars_workload_queue *queue,
+int mars_workload_queue_remove_end(struct mars_context *mars,
 				uint16_t id);
-int mars_workload_queue_remove_cancel(struct mars_workload_queue *queue,
+int mars_workload_queue_remove_cancel(struct mars_context *mars,
 				uint16_t id);
 
-int mars_workload_queue_schedule_begin(struct mars_workload_queue *queue,
+int mars_workload_queue_schedule_begin(struct mars_context *mars,
 				uint16_t id, uint8_t priority,
 				struct mars_workload_context **workload);
-int mars_workload_queue_schedule_end(struct mars_workload_queue *queue,
+int mars_workload_queue_schedule_end(struct mars_context *mars,
 				uint16_t id);
-int mars_workload_queue_schedule_cancel(struct mars_workload_queue *queue,
+int mars_workload_queue_schedule_cancel(struct mars_context *mars,
 				uint16_t id);
 
-int mars_workload_queue_wait(struct mars_workload_queue *queue,
+int mars_workload_queue_wait(struct mars_context *mars,
 				uint16_t id,
 				struct mars_workload_context **workload);
-int mars_workload_queue_try_wait(struct mars_workload_queue *queue,
+int mars_workload_queue_try_wait(struct mars_context *mars,
 				uint16_t id,
 				struct mars_workload_context **workload);
-int mars_workload_queue_signal_send(struct mars_workload_queue *queue,
+int mars_workload_queue_signal_send(struct mars_context *mars,
 				uint16_t id);
 
 #if defined(__cplusplus)






More information about the cbe-oss-dev mailing list