summaryrefslogtreecommitdiff
path: root/utils/tuning/libtuning/modules/awb/__init__.py
diff options
context:
space:
mode:
authorHarvey Yang <chenghaoyang@chromium.org>2025-01-07 14:41:37 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-01-09 23:18:56 +0200
commitd49a84a4f3aa63efc900564ff32558e4f5d85b04 (patch)
tree70fd3d4d3aa353b2795e972f9ea45f61546e90a6 /utils/tuning/libtuning/modules/awb/__init__.py
parent8d50577c0f6a4ff775b774e5803f7ec0928ff2c7 (diff)
Thread: Fix setThreadAffinity race condition in startHEADmaster
Previously we call Thread::setThreadAffinityInternal in Thread::startThread. The purpose was to avoid the main workload being run on incorrect CPUs. This leads to a race condition of setting `Thread::thread_` in `Thread::start()` and accessing `Thread::setThreadAffinityInternal` though. This patch moves the call after the construction of std::thread to avoid the race condition. The downside is that the first tasks, if any, upon starting a thread might be run on incorrect CPUs. Fixes: 4d9db06d6690 ("libcamera: add method to set thread affinity") Signed-off-by: Harvey Yang <chenghaoyang@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'utils/tuning/libtuning/modules/awb/__init__.py')
0 files changed, 0 insertions, 0 deletions