From f8ca28dde976347ba55887df3b0098ce7f32d075 Mon Sep 17 00:00:00 2001 From: Wyatt Hepler Date: Mon, 10 Feb 2025 15:44:05 -0800 Subject: [PATCH] pw_thread_stl: CMake build for thread creation backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9157de888395b5de9ca1101669ad75a3d1217c27 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/266039 Reviewed-by: Alexei Frolov Lint: Lint 🤖 Presubmit-Verified: CQ Bot Account Commit-Queue: Auto-Submit Pigweed-Auto-Submit: Wyatt Hepler Docs-Not-Needed: Wyatt Hepler --- pw_thread_stl/CMakeLists.txt | 11 +++++++++++ pw_toolchain/host_clang/toolchain.cmake | 1 + pw_toolchain/host_gcc/toolchain.cmake | 1 + 3 files changed, 13 insertions(+) diff --git a/pw_thread_stl/CMakeLists.txt b/pw_thread_stl/CMakeLists.txt index 3d48f3875e..4e06a0e05d 100644 --- a/pw_thread_stl/CMakeLists.txt +++ b/pw_thread_stl/CMakeLists.txt @@ -43,6 +43,17 @@ pw_add_library(pw_thread_stl.thread INTERFACE pw_thread.thread.facade ) +pw_add_library(pw_thread_stl.thread_creation INTERFACE + HEADERS + thread_creation_public_overrides/pw_thread_backend/context.h + thread_creation_public_overrides/pw_thread_backend/options.h + thread_creation_public_overrides/pw_thread_backend/priority.h + thread_creation_public_overrides/pw_thread_backend/stack.h + PUBLIC_INCLUDES + thread_creation_public_overrides + PUBLIC_DEPS + pw_thread_stl.thread +) # This target provides the backend for pw::this_thread::sleep_{for,until}. pw_add_library(pw_thread_stl.sleep INTERFACE diff --git a/pw_toolchain/host_clang/toolchain.cmake b/pw_toolchain/host_clang/toolchain.cmake index f9ab9522e6..415a8c20f9 100644 --- a/pw_toolchain/host_clang/toolchain.cmake +++ b/pw_toolchain/host_clang/toolchain.cmake @@ -75,6 +75,7 @@ pw_set_backend(pw_thread.id pw_thread_stl.id) pw_set_backend(pw_thread.yield pw_thread_stl.yield) pw_set_backend(pw_thread.sleep pw_thread_stl.sleep) pw_set_backend(pw_thread.thread pw_thread_stl.thread) +pw_set_backend(pw_thread.thread_creation pw_thread_stl.thread_creation) pw_set_backend(pw_thread.test_thread_context pw_thread_stl.test_thread_context) pw_set_backend(pw_thread.thread_iteration pw_thread_stl.thread_iteration) diff --git a/pw_toolchain/host_gcc/toolchain.cmake b/pw_toolchain/host_gcc/toolchain.cmake index 0f39140b61..51c67526dc 100644 --- a/pw_toolchain/host_gcc/toolchain.cmake +++ b/pw_toolchain/host_gcc/toolchain.cmake @@ -75,6 +75,7 @@ pw_set_backend(pw_thread.id pw_thread_stl.id) pw_set_backend(pw_thread.yield pw_thread_stl.yield) pw_set_backend(pw_thread.sleep pw_thread_stl.sleep) pw_set_backend(pw_thread.thread pw_thread_stl.thread) +pw_set_backend(pw_thread.thread_creation pw_thread_stl.thread_creation) pw_set_backend(pw_thread.test_thread_context pw_thread_stl.test_thread_context) pw_set_backend(pw_thread.thread_iteration pw_thread_stl.thread_iteration)