From 7b61f2e0650f1274aa25a3da7cb912e20be20005 Mon Sep 17 00:00:00 2001 From: FritzFlorian Date: Thu, 6 Jun 2019 11:48:22 +0200 Subject: [PATCH] Fix: Remove old import prohibiting compilation --- app/playground/main.cpp | 3 +-- lib/pls/src/internal/scheduling/scheduler.cpp | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/playground/main.cpp b/app/playground/main.cpp index d3a7a50..cde3abd 100644 --- a/app/playground/main.cpp +++ b/app/playground/main.cpp @@ -7,8 +7,7 @@ #include #include -#include -#include +#include int main() { diff --git a/lib/pls/src/internal/scheduling/scheduler.cpp b/lib/pls/src/internal/scheduling/scheduler.cpp index 7f725b2..4a36132 100644 --- a/lib/pls/src/internal/scheduling/scheduler.cpp +++ b/lib/pls/src/internal/scheduling/scheduler.cpp @@ -100,9 +100,7 @@ task *scheduler::steal_task() { size_t target = (offset + i) % num_threads(); // Skip our self for stealing - if (target == my_id) { - continue; - } + target = ((target == my_id) + target) % num_threads(); auto target_state = thread_state_for(target); // TODO: See if we should re-try popping if it failed due to contention -- libgit2 0.26.0