pw_thread: Mark legacy function* / void* constructor as deprecated
pw::thread::Thread now takes a pw::Function<void()>, which should be
used in place of the void(void*) function pointer and void* argument.
For example, replace code like the following:
void CallBar(void* foo) {
static_cast<Foo*>->Bar();
}
void StartThread() {
Foo foo;
thread = Thread(options, CallBar, &foo);
...
}
with a lambda:
void StartThread() {
Foo foo;
thread = Thread(options, [&foo] { foo.Bar(); });
...
}
Bug: b/367786892
Change-Id: I6639ee94a201600cd0f0644fe4ab2c79a1492080
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/236454
Docs-Not-Needed: Wyatt Hepler <hepler@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.