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(); } } }