third_party.pigweed.src/pw_thread/backend.gni
Ewout van Bekkum 0f3901eda4 pw_thread: adds thread creation
Adds a std::thread like API through a new pw_thread facade based
on the STL's std::thread API, however with more restricted function
entry routine format support and backend specific option support
to permit non-portable configuration of thread settings/parameters
including static context allocations.

In addition this provides an initial set of backends based on using
the STL's std::thread directly.

Change-Id: Ib8c3cbdc434044e204e67e58d861a40e4acec9b4
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/30920
Reviewed-by: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
2021-02-19 21:37:16 +00:00

33 lines
1.2 KiB
Plaintext

# Copyright 2020 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
declare_args() {
# Backend for the pw_thread module's pw::thread::Id.
pw_thread_ID_BACKEND = ""
# Backend for the pw_thread module's pw::thread::sleep_{for,until}.
pw_thread_SLEEP_BACKEND = ""
# Backend for the pw_thread module's pw::thread::Thread to create threads.
pw_thread_THREAD_BACKEND = ""
# Backend for the pw_thread module's pw::thread::yield.
pw_thread_YIELD_BACKEND = ""
# Whether the GN asserts should be silenced in ensuring that a compatible
# backend for pw_chrono_SYSTEM_CLOCK_BACKEND is chosen.
# Set to true to disable the asserts.
pw_thread_OVERRIDE_SYSTEM_CLOCK_BACKEND_CHECK = false
}