libcamera/include/libcamera/internal
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
..
tracepoints libcamera: request: Add Request::cancel() 2021-06-14 12:26:27 +02:00
bayer_format.h libcamera: bayer_format: Overload ==/!= operators for BayerFormats 2021-02-04 21:00:38 +02:00
buffer.h libcamera: MappedBuffer: Disable copy and assignment 2021-02-12 14:35:21 +00:00
byte_stream_buffer.h libcamera: Utilise LIBCAMERA_DISABLE_COPY 2021-02-12 14:35:20 +00:00
camera_controls.h libcamera: Rename header guards for internal headers 2020-06-06 00:25:04 +03:00
camera_sensor.h libcamera: CameraSensor: Enable retrieving supported test pattern modes 2021-06-14 14:10:58 +02:00
camera_sensor_properties.h libcamera: CameraSensorProperties: Add table of v4l2 index and test pattern 2021-06-14 14:10:53 +02:00
control_serializer.h libcamera: control_serializer: Save serialized ControlInfoMap in a cache 2021-02-16 19:20:57 +09:00
control_validator.h libcamera: Declare empty virtual destructors as defaulted 2020-10-23 22:53:13 +03:00
delayed_controls.h libcamera: delayed_controls: Remove unneeded write when starting up 2021-03-12 14:12:55 +00:00
device_enumerator.h libcamera: device_enumerator: Remove unnecessary rvalue references 2021-03-23 03:47:01 +02:00
device_enumerator_sysfs.h libcamera: Rename header guards for internal headers 2020-06-06 00:25:04 +03:00
device_enumerator_udev.h libcamera: device_enumerator: Remove unnecessary rvalue references 2021-03-23 03:47:01 +02:00
event_dispatcher.h libcamera: Rename wrong header guards for internal includes 2021-01-23 09:27:50 +02:00
event_dispatcher_poll.h libcamera: Move EventDispatcher to internal API 2020-11-15 22:21:28 +02:00
event_notifier.h libcamera: Rename wrong header guards for internal includes 2021-01-23 09:27:50 +02:00
file.h libcamera: Utilise LIBCAMERA_DISABLE_COPY 2021-02-12 14:35:20 +00:00
formats.h libcamera: formats: add numPlanes helper 2020-08-06 15:43:59 +01:00
ipa_data_serializer.h libcamera: Add IPADataSerializer 2021-02-16 19:21:18 +09:00
ipa_manager.h libcamera: IPAInterface: Replace C API with the new C++-only API 2021-02-16 19:22:28 +09:00
ipa_module.h libcamera: IPAInterface: Replace C API with the new C++-only API 2021-02-16 19:22:28 +09:00
ipa_proxy.h libcamera: ipa_proxy: Scope ProxyState to IPAProxy 2021-04-13 20:52:19 +01:00
ipc_pipe.h libcamera: Add IPCPipe 2021-02-16 19:21:25 +09:00
ipc_pipe_unixsocket.h libcamera: Add IPCPipe implementation based on unix socket 2021-02-16 19:21:29 +09:00
ipc_unixsocket.h libcamera: Don't unnecessarily include event_notifier.h 2020-09-21 13:50:30 +03:00
log.h libcamera: log: Destroy LogCategory instances in a controlled way 2021-06-15 12:46:39 +03:00
media_device.h libcamera: media_device: Add hwRevision method 2021-03-11 02:13:27 +02:00
media_object.h libcamera: media_object: Utilise LIBCAMERA_DISABLE_COPY_AND_MOVE 2021-02-12 14:35:12 +00:00
meson.build libcamera: V4L2Control: remove V4L2Control classes 2021-05-24 07:21:02 +03:00
message.h libcamera: object: Add deleteLater() support 2020-07-31 23:33:32 +03:00
pipeline_handler.h libcamera: camera: Assert pipelines complete all requests 2021-04-22 16:56:07 +01:00
process.h libcamera: ProcessManager: make ProcessManager lifetime explicitly managed 2020-10-07 19:17:31 +09:00
pub_key.h libcamera: Rename header guards for internal headers 2020-06-06 00:25:04 +03:00
semaphore.h libcamera: Rename header guards for internal headers 2020-06-06 00:25:04 +03:00
sysfs.h libcamera: sysfs: Add helper to lookup device firmware node path 2020-08-05 20:07:13 +02:00
thread.h libcamera: thread: Remove the unused setEventDispatcher() function 2021-03-29 23:49:33 +03:00
timer.h libcamera: Rename wrong header guards for internal includes 2021-01-23 09:27:50 +02:00
tracepoints.h.in libcamera: tracing: Implement tracing infrastructure 2020-11-03 11:07:21 +09:00
utils.h libcamera: utils: Add helper class for std::chrono::duration 2021-06-08 23:56:03 +03:00
v4l2_device.h libcamera: V4L2Device: Support v4l2 menu control 2021-06-14 14:10:48 +02:00
v4l2_pixelformat.h libcamera: Rename header guards for internal headers 2020-06-06 00:25:04 +03:00
v4l2_subdevice.h libcamera: Utilise LIBCAMERA_DISABLE_COPY 2021-02-12 14:35:20 +00:00
v4l2_videodevice.h libcamera: Utilise LIBCAMERA_DISABLE_COPY 2021-02-12 14:35:20 +00:00