From bed7d8a6197fd8ec0b5dc8a3a900680f8a7b6a95 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Thu, 8 Oct 2020 13:32:34 +0800 Subject: [PATCH] threads: begin change to cooperative threading --- src/concurrency/BaseThread.cpp | 2 +- src/concurrency/{Thread.h => OSThread.h} | 4 ++-- src/concurrency/WorkerThread.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/concurrency/{Thread.h => OSThread.h} (73%) diff --git a/src/concurrency/BaseThread.cpp b/src/concurrency/BaseThread.cpp index ab39a8c9f..5f304b5fe 100644 --- a/src/concurrency/BaseThread.cpp +++ b/src/concurrency/BaseThread.cpp @@ -1,4 +1,4 @@ -#include "Thread.h" +#include "BaseThread.h" #include namespace concurrency diff --git a/src/concurrency/Thread.h b/src/concurrency/OSThread.h similarity index 73% rename from src/concurrency/Thread.h rename to src/concurrency/OSThread.h index f9fa60fde..52ecdf525 100644 --- a/src/concurrency/Thread.h +++ b/src/concurrency/OSThread.h @@ -7,11 +7,11 @@ namespace concurrency { #ifdef HAS_FREE_RTOS -typedef FreeRtosThread Thread; +typedef FreeRtosThread OSThread; #endif #ifdef __unix__ -typedef PosixThread Thread; +typedef PosixThread OSThread; #endif } // namespace concurrency diff --git a/src/concurrency/WorkerThread.h b/src/concurrency/WorkerThread.h index 66111e7d7..c9b2c6b35 100644 --- a/src/concurrency/WorkerThread.h +++ b/src/concurrency/WorkerThread.h @@ -1,6 +1,6 @@ #pragma once -#include "Thread.h" +#include "OSThread.h" namespace concurrency { @@ -10,7 +10,7 @@ namespace concurrency { * * @link https://www.freertos.org/RTOS_Task_Notification_As_Mailbox.html */ -class WorkerThread : public Thread +class WorkerThread : public OSThread { protected: /**