mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-20 13:51:05 +00:00
pw_thread_freertos: add explicit EventGroupHandle_t casts
No-Docs-Update-Reason: No API change, fixes compilation for downstream toolchains. Change-Id: I474a344258e0f7c675eeecc3482f2dc7eb6abc06 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/62647 Commit-Queue: Jack Arendt <jackarendt@google.com> Reviewed-by: Ewout van Bekkum <ewout@google.com>
This commit is contained in:
parent
8b0c124592
commit
fb1492d144
|
@ -49,7 +49,8 @@ void Context::ThreadEntryPoint(void* void_context_ptr) {
|
|||
// If the thread handle was detached before the thread finished execution,
|
||||
// i.e. got here, then we are responsible for cleaning up the join event
|
||||
// group.
|
||||
vEventGroupDelete(&context.join_event_group());
|
||||
vEventGroupDelete(
|
||||
reinterpret_cast<EventGroupHandle_t>(&context.join_event_group()));
|
||||
#endif // PW_THREAD_JOINING_ENABLED
|
||||
|
||||
#if PW_THREAD_FREERTOS_CONFIG_DYNAMIC_ALLOCATION_ENABLED
|
||||
|
@ -72,7 +73,9 @@ void Context::ThreadEntryPoint(void* void_context_ptr) {
|
|||
xTaskResumeAll();
|
||||
|
||||
#if PW_THREAD_JOINING_ENABLED
|
||||
xEventGroupSetBits(&context.join_event_group(), kThreadDoneBit);
|
||||
xEventGroupSetBits(
|
||||
reinterpret_cast<EventGroupHandle_t>(&context.join_event_group()),
|
||||
kThreadDoneBit);
|
||||
#endif // PW_THREAD_JOINING_ENABLED
|
||||
|
||||
while (true) {
|
||||
|
@ -97,7 +100,8 @@ void Context::TerminateThread(Context& context) {
|
|||
#if PW_THREAD_JOINING_ENABLED
|
||||
// Just in case someone abused our API, ensure their use of the event group is
|
||||
// properly handled by the kernel regardless.
|
||||
vEventGroupDelete(&context.join_event_group());
|
||||
vEventGroupDelete(
|
||||
reinterpret_cast<EventGroupHandle_t>(&context.join_event_group()));
|
||||
#endif // PW_THREAD_JOINING_ENABLED
|
||||
|
||||
#if PW_THREAD_FREERTOS_CONFIG_DYNAMIC_ALLOCATION_ENABLED
|
||||
|
@ -225,7 +229,8 @@ void Thread::join() {
|
|||
PW_CHECK(this_thread::get_id() != get_id());
|
||||
|
||||
// Wait indefinitely until kThreadDoneBit is set.
|
||||
while (xEventGroupWaitBits(&native_type_->join_event_group(),
|
||||
while (xEventGroupWaitBits(reinterpret_cast<EventGroupHandle_t>(
|
||||
&native_type_->join_event_group()),
|
||||
kThreadDoneBit,
|
||||
pdTRUE, // Clear the bits.
|
||||
pdFALSE, // Any bits is fine, N/A.
|
||||
|
|
Loading…
Reference in New Issue
Block a user