Arcane  v3.14.11.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
ConcurrencyGlobal.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* ConcurrencyGlobal.h (C) 2000-2024 */
9/* */
10/* Définitions globales de la composante 'Concurrency' de 'Arccore'. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_CONCURRENCY_CONCURRENCYGLOBAL_H
13#define ARCCORE_CONCURRENCY_CONCURRENCYGLOBAL_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22#if defined(ARCCORE_COMPONENT_arccore_concurrency)
23#define ARCCORE_CONCURRENCY_EXPORT ARCCORE_EXPORT
24#define ARCCORE_CONCURRENCY_EXTERN_TPL
25#else
26#define ARCCORE_CONCURRENCY_EXPORT ARCCORE_IMPORT
27#define ARCCORE_CONCURRENCY_EXTERN_TPL extern
28#endif
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33namespace Arccore
34{
35class IThreadImplementation;
36class Mutex;
37class SpinLock;
38class GlobalMutex;
39class IThreadBarrier;
40class NullThreadImplementation;
41class NullThreadBarrier;
42
43//! Classe opaque encapsulant l'implementation des threads
44class ThreadImpl;
45//! Classe opaque encapsulant l'implementation d'un mutex
46class MutexImpl;
47} // namespace Arccore
48
49/*---------------------------------------------------------------------------*/
50/*---------------------------------------------------------------------------*/
51
52ARCCORE_DECLARE_REFERENCE_COUNTED_CLASS(IThreadImplementation)
53
54/*---------------------------------------------------------------------------*/
55/*---------------------------------------------------------------------------*/
56
57namespace Arccore::Concurrency
58{
59
60/*---------------------------------------------------------------------------*/
61/*---------------------------------------------------------------------------*/
62
63extern "C++" ARCCORE_CONCURRENCY_EXPORT IThreadImplementation*
64getThreadImplementation();
65extern "C++" ARCCORE_CONCURRENCY_EXPORT IThreadImplementation*
66setThreadImplementation(IThreadImplementation* impl);
67
68/*---------------------------------------------------------------------------*/
69/*---------------------------------------------------------------------------*/
70
71extern "C++" ARCCORE_CONCURRENCY_EXPORT Ref<IThreadImplementation>
72createGlibThreadImplementation();
73
74extern "C++" ARCCORE_CONCURRENCY_EXPORT Ref<IThreadImplementation>
75createStdThreadImplementation();
76
77extern "C++" ARCCORE_CONCURRENCY_EXPORT Ref<IThreadImplementation>
78createNullThreadImplementation();
79
80/*---------------------------------------------------------------------------*/
81/*---------------------------------------------------------------------------*/
82
83} // namespace Arccore::Concurrency
84
85/*---------------------------------------------------------------------------*/
86/*---------------------------------------------------------------------------*/
87
88#endif
#define ARCCORE_DECLARE_REFERENCE_COUNTED_CLASS(class_name)
Macro pour déclarer qu'une classe utilise un compteur de référence.
Espace de nom de Arccore.
Definition ArcaneTypes.h:24