libcamera/include
Barnabás Pőcze 16bcc5a3e4 libcamera: base: log: Make LogCategory::severity_ atomic
The severity of a log category may be changed from a different thread,
so it is important to ensure that the reads and writes happen atomically.
Using `std::memory_order_relaxed` should not introduce any synchronization
overhead, it should only guarantee that the operation itself is atomic.

Secondly, inline `LogCategory::setSeverity()`, as it is merely an
assignment, so going through a DSO call is a big pessimization.
`LogCategory` is not part of the public API, so this change has
no external effects.

Thirdly, assert that the atomic variable is lock free so as to ensure
it won't silently fall back to libatomic (or similar) on any platform.
If this assertion fails, this needs to be revisited.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
2025-02-27 11:30:23 +01:00
..
android android: Add missing SPDX headers to Android headers 2022-09-30 21:51:18 +03:00
libcamera libcamera: base: log: Make LogCategory::severity_ atomic 2025-02-27 11:30:23 +01:00
linux include: linux: videodev2: Add generic line based pixel formats 2025-01-08 14:28:35 +01:00
meson.build libcamera: tracing: fix header generation when built as subproject 2022-11-24 14:52:00 +00:00