Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
global_mutexes.h
Go to the documentation of this file.
1/*
2 This file is part of Ansel,
3 Copyright (C) 2026 Aurélien PIERRE.
4
5 Ansel is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 Ansel is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with Ansel. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef DT_COMMON_GLOBAL_MUTEXES_H
20#define DT_COMMON_GLOBAL_MUTEXES_H
21
22/* Process-wide locks owned by the orchestrator (darktable.c).
23 *
24 * They are process-wide because the thing they serialize is process-wide -- a
25 * non-reentrant third-party library, or a resource the whole application shares.
26 * There is no per-call context to carry them on, so an accessor is the end state
27 * here, not a stepping stone: see doc/globals-migration.md, category "process-wide
28 * buses".
29 *
30 * Declared here so that the modules which need them (iop/lens.cc, iop/watermark.c,
31 * imageio/storage/disk.c, imageio/imageio_rawspeed.cc, ...) do not have to include
32 * darktable.h, and therefore the whole application, to take a lock. */
33
34#include "system/dtpthread.h"
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
42dt_pthread_mutex_t *dt_plugin_threadsafe_mutex(void);
43
47dt_pthread_mutex_t *dt_pipeline_threadsafe_mutex(void);
48
50dt_pthread_mutex_t *dt_exiv2_threadsafe_mutex(void);
51
53dt_pthread_mutex_t *dt_readfile_mutex(void);
54
59#ifdef __cplusplus
60}
61#endif
62
63#endif // DT_COMMON_GLOBAL_MUTEXES_H
64
65// clang-format off
66// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
67// vim: shiftwidth=2 expandtab tabstop=2 cindent
68// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
69// clang-format on
dt_pthread_mutex_t * dt_pipeline_threadsafe_mutex(void)
Definition darktable.c:616
dt_pthread_mutex_t * dt_plugin_threadsafe_mutex(void)
Definition darktable.c:611
dt_pthread_mutex_t * dt_exiv2_threadsafe_mutex(void)
Definition darktable.c:621
dt_pthread_mutex_t * dt_readfile_mutex(void)
Definition darktable.c:626