Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed GEDF_NP and removal of deprecated schedulers #282

Merged
merged 6 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ jobs:
compiler-ref: ${{ needs.fetch-lf.outputs.ref }}
scheduler: GEDF_NP

lf-gedf-np-ci:
needs: fetch-lf
uses: lf-lang/lingua-franca/.github/workflows/c-tests.yml@master
with:
runtime-ref: ${{ github.ref }}
compiler-ref: ${{ needs.fetch-lf.outputs.ref }}
scheduler: GEDF_NP_CI

lf-adaptive:
needs: fetch-lf
uses: lf-lang/lingua-franca/.github/workflows/c-tests.yml@master
Expand Down
2 changes: 0 additions & 2 deletions core/threaded/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ set(
THREADED_SOURCES
reactor_threaded.c
scheduler_adaptive.c
scheduler_GEDF_NP_CI.c
scheduler_GEDF_NP.c
scheduler_NP.c
scheduler_PEDF_NP.c
scheduler_sync_tag_advance.c
scheduler_instance.c
watchdog.c
Expand Down
14 changes: 8 additions & 6 deletions core/threaded/scheduler_GEDF_NP.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @author{Marten Lohstroh <marten@berkeley.edu>}
*/
#include "lf_types.h"
#if SCHEDULER == GEDF_NP
#if SCHEDULER == SCHED_GEDF_NP
#ifndef NUMBER_OF_WORKERS
#define NUMBER_OF_WORKERS 1
#endif // NUMBER_OF_WORKERS
Expand Down Expand Up @@ -87,15 +87,17 @@ int _lf_sched_distribute_ready_reactions(lf_scheduler_t* scheduler) {
// Note: All the threads are idle, which means that they are done inserting
// reactions. Therefore, the reaction queues can be accessed without locking
// a mutex.
for (; scheduler->next_reaction_level <=
scheduler->max_reaction_level;
try_advance_level(scheduler->env, &scheduler->next_reaction_level)) {

while (scheduler->next_reaction_level <= scheduler->max_reaction_level) {
LF_PRINT_DEBUG("Waiting with curr_reaction_level %zu.", scheduler->next_reaction_level);
try_advance_level(scheduler->env, &scheduler->next_reaction_level);

tmp_queue = ((pqueue_t**)scheduler->triggered_reactions)
[scheduler->next_reaction_level];
[scheduler->next_reaction_level-1];
size_t reactions_to_execute = pqueue_size(tmp_queue);

if (reactions_to_execute) {
scheduler->executing_reactions = tmp_queue;
scheduler->next_reaction_level++;
return reactions_to_execute;
}
}
Expand Down
Loading