libcamera/include/libcamera
Laurent Pinchart 01e387acb0 libcamera: log: Destroy LogCategory instances in a controlled way
The LogCategory instances are constructed on first use as static
variables in accessor functions, following the Meyers singleton pattern.
As a result, their destruction order is not guaranteed. This can cause
issues as the global Logger object, constructed in a similar fashion, is
accessed from the LogCategory destructor and may be destroyed first.

To fix this, keep the same singleton pattern, but allocate the
LogCategory instances dynamically. As they get registered with the
global Logger instance, we can destroy them in the Logger destructor.

This only avoids destruction order issues between LogCategory and
Logger, and doesn't address yet the fact that LOG() calls from
destructors of global objects may access an already destroyed Logger.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chormium.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-15 12:46:39 +03:00
..
internal libcamera: log: Destroy LogCategory instances in a controlled way 2021-06-15 12:46:39 +03:00
ipa ipa: ipu3: Support return values from configure() 2021-06-14 09:21:42 +01:00
bound_method.h libcamera: bound_method: Please the gcc undefined behaviour sanitizer 2021-04-17 00:53:01 +03:00
buffer.h libcamera: pipeline: ipu3: Cancel unused buffers 2021-04-22 16:56:07 +01:00
camera.h libcamera: Drop argument from LIBCAMERA_DECLARE_PRIVATE 2021-04-21 09:52:34 +02:00
camera_manager.h libcamera: Drop argument from LIBCAMERA_DECLARE_PRIVATE 2021-04-21 09:52:34 +02:00
class.h libcamera: class: Drop 'klass' argument from documentation 2021-04-21 09:53:08 +02:00
compiler.h libcamera: Add macro to conditionally use [[nodiscard]] 2021-02-04 21:00:38 +02:00
control_ids.h.in libcamera: controls: Generate an array of valid values 2020-10-26 17:51:55 +01:00
controls.h libcamera: controls: Add a function to merge two control lists 2021-05-06 15:07:52 +02:00
file_descriptor.h libcamera: file_descriptor: Implement move semantics for constructor 2020-05-19 18:07:49 +03:00
formats.h.in libcamera: Define constants for pixel formats in the public API 2020-06-18 13:26:36 +03:00
framebuffer_allocator.h libcamera: Utilise LIBCAMERA_DISABLE_COPY 2021-02-12 14:35:20 +00:00
geometry.h libcamera: geometry: Mark const functions with __nodiscard 2021-02-04 21:00:38 +02:00
logging.h libcamera: logging: add syslog, stream, and nowhere logging targets 2019-07-17 14:36:35 +09:00
meson.build libcamera: Use get_option('includedir') instead of raw 'include' 2021-05-11 11:57:11 +01:00
object.h Revert "libcamera: Use helper variable template for type traits" 2021-01-31 17:52:17 +02:00
pixel_format.h libcamera: pixel_format: Add a function to return format based on string 2020-08-03 11:48:47 +01:00
property_ids.h.in libcamera: Support draft controls and properties 2020-10-26 17:51:54 +01:00
request.h libcamera: request: Add Request::cancel() 2021-06-14 12:26:27 +02:00
signal.h libcamera: signal: Fix return value template type of BoundMethodMember 2021-04-17 00:52:57 +03:00
span.h libcamera: span: Fix reverse iterators 2021-04-15 22:23:02 +03:00
stream.h libcamera: stream: Rename StillCaptureRaw to Raw 2020-09-30 14:01:01 +02:00
transform.h libcamera: Add Transform enum to represent 2D plane transforms. 2020-09-29 11:43:06 +01:00
version.h.in libcamera: Rework automatic version generation to avoid rebuilds 2019-07-09 12:34:10 +03:00