libcamera/src
Laurent Pinchart 6f1bd9cf55 libcamera: object: Add and use thread-bound assertion
Several functions in libcamera classes are marked as thread-bound,
restricting the contexts in which those functions can be called. There
is no infrastructure to enforce these restrictions, causing difficult to
debug race conditions when they are not met by callers.

As a first step to solve this, add an assertThreadBound() protected
function to the Object class to test if the calling thread context is
valid, and use it in member functions of Object subclasses marked as
thread-bound. This replaces manual tests in a few locations.

The thread-bound member functions of classes that do not inherit from
Object are not checked, and neither are the functions of classes marked
as thread-bound at the class level. These issue should be addressed in
the future.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25 02:39:22 +02:00
..
android android: camera_device: Fix requestedStream handling 2023-09-21 12:44:09 +02:00
apps apps: common: dng_writer: Add a default case for switch-case on a modulo 2024-01-24 17:29:24 +02:00
gstreamer gstreamer: Add meson devenv support 2024-01-23 02:21:39 +02:00
ipa libipa: camera_sensor_helper: Mark createInstance() with override 2024-01-12 12:49:20 +02:00
libcamera libcamera: object: Add and use thread-bound assertion 2024-01-25 02:39:22 +02:00
py meson: Tag all installed files 2023-12-07 01:43:17 +02:00
v4l2 meson: Tag all installed files 2023-12-07 01:43:17 +02:00
meson.build v4l2: Move the v4l2 compat layer to libexec/libcamera 2023-05-04 20:05:02 +01:00