From 1ba533bbcd405d12d6573e7c0f8c994a9cd94541 Mon Sep 17 00:00:00 2001 From: Tobias Langer Date: Fri, 19 Aug 2016 11:49:35 +0200 Subject: [PATCH] Added GEDF-Scheduler function. --- mtapi_c/src/embb_mtapi_scheduler_t.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/mtapi_c/src/embb_mtapi_scheduler_t.c b/mtapi_c/src/embb_mtapi_scheduler_t.c index 2964ace..0495030 100644 --- a/mtapi_c/src/embb_mtapi_scheduler_t.c +++ b/mtapi_c/src/embb_mtapi_scheduler_t.c @@ -169,6 +169,24 @@ embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task_lf( return task; } +#ifdef EMBB_HARD_REALTIME +embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task_gedf( + embb_mtapi_scheduler_t * that, + embb_mtapi_node_t * node, + embb_mtapi_thread_context_t * thread_context) { + embb_mtapi_task_t * task = MTAPI_NULL; + + EMBB_UNUSED(thread_context); + + assert(MTAPI_NULL != that); + assert(MTAPI_NULL != node); + + task = embb_mtapi_task_queue_pop(&node->global_task_queue); + + return task; +} +#endif /*EMBB_HARD_REALTIME*/ + embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task( embb_mtapi_scheduler_t * that, embb_mtapi_node_t * node, @@ -188,6 +206,12 @@ embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task( task = embb_mtapi_scheduler_get_next_task_vhpf( that, node, thread_context); break; +#ifdef EMBB_HARD_REALTIME + case GLOBAL_EDF: + task = embb_mtapi_scheduler_get_next_task_gedf( + that, node, thread_context); + break; +#endif /*EMBB_HARD_REALTIME*/ case NUM_SCHEDULER_MODES: default: embb_mtapi_log_error( -- libgit2 0.26.0