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/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
* Audited 2026-08-27; see doc/lock-audit.md for what each one protects and what was
35
* removed. The list is deliberately short and getting shorter: a lock belongs to the module
36
* whose invariant it defends, not to the application struct. What remains here is
37
* process-wide because the thing it serializes genuinely is. */
38
39
#include "
system/dtpthread.h
"
40
41
#ifdef __cplusplus
42
extern
"C"
{
43
#endif
44
48
dt_pthread_mutex_t *
dt_pipeline_threadsafe_mutex
(
void
);
49
54
#ifdef __cplusplus
55
}
56
#endif
57
58
#endif
// DT_COMMON_GLOBAL_MUTEXES_H
59
60
// clang-format off
61
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
62
// vim: shiftwidth=2 expandtab tabstop=2 cindent
63
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
64
// clang-format on
dtpthread.h
dt_pipeline_threadsafe_mutex
dt_pthread_mutex_t * dt_pipeline_threadsafe_mutex(void)
Definition
darktable.c:607
src
common
global_mutexes.h
Generated by
1.9.8