Commit cf15b2b6 by Tobias Langer

Switched from global task queue to global priority queue.

parent 429e58d6
......@@ -130,7 +130,7 @@ void mtapi_initialize(
}
#ifdef EMBB_HARD_REALTIME
embb_mtapi_task_queue_initialize_with_capacity(
embb_mtapi_priority_queue_initialize_with_capacity(
&node->global_task_queue,
node->attributes.max_tasks);
#endif
......@@ -209,7 +209,7 @@ void mtapi_finalize(MTAPI_OUT mtapi_status_t* status) {
}
#ifdef EMBB_HARD_REALTIME
embb_mtapi_task_queue_finalize(&node->global_task_queue);
embb_mtapi_priority_queue_finalize(&node->global_task_queue);
#endif
/* free system instance */
......
......@@ -33,7 +33,7 @@
#include <embb_mtapi_log.h>
#ifdef EMBB_HARD_REALTIME
#include <embb_mtapi_task_queue_t.h>
#include <embb_mtapi_priority_queue_t.h>
#endif /*EMBB_HARD_REALTIME*/
#ifdef __cplusplus
......@@ -76,7 +76,7 @@ struct embb_mtapi_node_struct {
embb_atomic_int is_scheduler_running;
mtapi_affinity_t affinity_all;
#ifdef EMBB_HARD_REALTIME
embb_mtapi_task_queue_t global_task_queue;
embb_mtapi_priority_queue_t global_task_queue;
#endif /*EMBB_HARD_REALTIME*/
};
......
......@@ -38,7 +38,7 @@
#include <embb_mtapi_task_context_t.h>
#include <embb_mtapi_task_t.h>
#ifdef EMBB_HARD_REALTIME
#include <embb_mtapi_task_queue_t.h>
#include <embb_mtapi_priority_queue_t.h>
#endif /*EMBB_HARD_REALTIME*/
#include <embb_mtapi_action_t.h>
#include <embb_mtapi_alloc.h>
......@@ -181,7 +181,7 @@ embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task_gedf(
assert(MTAPI_NULL != that);
assert(MTAPI_NULL != node);
task = embb_mtapi_task_queue_pop(&node->global_task_queue);
task = embb_mtapi_priority_queue_pop(&node->global_task_queue);
return task;
}
......@@ -649,7 +649,7 @@ mtapi_boolean_t embb_mtapi_scheduler_schedule_task(
/* one more task in flight for this action */
embb_atomic_fetch_and_add_int(&local_action->num_tasks, 1);
pushed = embb_mtapi_task_queue_push(&node->global_task_queue, task);
pushed = embb_mtapi_priority_queue_push(&node->global_task_queue, task);
if (!pushed) {
embb_atomic_fetch_and_add_int(&local_action->num_tasks, -1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment