From e1eb31da4df57784144c0b002aaa5760d484818a Mon Sep 17 00:00:00 2001 From: FritzFlorian Date: Mon, 6 Apr 2020 17:26:31 +0200 Subject: [PATCH] Fix clean out references to legacy builds in the code. --- app/context_switch/main.cpp | 2 +- lib/pls/src/internal/scheduling/scheduler.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/context_switch/main.cpp b/app/context_switch/main.cpp index 8fdbfcb..97e72bd 100644 --- a/app/context_switch/main.cpp +++ b/app/context_switch/main.cpp @@ -170,7 +170,7 @@ int main() { for (unsigned int i = 0; i < STACK_SIZE; i++) { if (custom_stack_1[i] != MAGIC_NUMBER) { - printf("\n\nUsed stack size about %u bytes.\n", (STACK_SIZE - i)); + printf("\n\nUsed stack size about %lu bytes.\n", (STACK_SIZE - i)); break; } } diff --git a/lib/pls/src/internal/scheduling/scheduler.cpp b/lib/pls/src/internal/scheduling/scheduler.cpp index 06ba412..29a776a 100644 --- a/lib/pls/src/internal/scheduling/scheduler.cpp +++ b/lib/pls/src/internal/scheduling/scheduler.cpp @@ -1,10 +1,10 @@ #include "pls/internal/scheduling/scheduler.h" #include "context_switcher/context_switcher.h" - -#include "pls/internal/base/thread.h" #include "pls/internal/base/error_handling.h" +#include + namespace pls::internal::scheduling { scheduler::scheduler(unsigned int num_threads, @@ -16,7 +16,6 @@ scheduler::scheduler(unsigned int num_threads, reuse_thread, base::mmap_stack_allocator{}) {} - scheduler::~scheduler() { terminate(); } @@ -97,7 +96,7 @@ void scheduler::work_thread_work_section() { } else { failed_steals++; if (failed_steals >= num_threads) { - base::this_thread::yield(); + std::this_thread::yield(); } } } -- libgit2 0.26.0