]> Kevux Git Server - fll/commit
Update: Use copy of flag to avoid possible race conditions with controller_thread_is_...
authorKevin Day <Kevin@kevux.org>
Sat, 13 Jul 2024 04:28:38 +0000 (23:28 -0500)
committerKevin Day <Kevin@kevux.org>
Sat, 13 Jul 2024 04:28:38 +0000 (23:28 -0500)
commitf9c8d8e731928a9705d0208046b2a7faf92ccf32
treec33a87e5bf59a356f99c5cadffc1203f7bf89dbe
parentc586ae8a1aeb88cf9328dbe1d890208ea2923f09
Update: Use copy of flag to avoid possible race conditions with controller_thread_is_enabled().

The thread.enabled is checked multiple times in controller_thread_is_enabled() but this value may have changed.
Make a constant copy and reference that copy so that any changes after the first read will not affect the function results.
level_3/controller/c/thread/private-thread.c