Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qgenericatomic.h
Go to the documentation of this file.
1
// Copyright (C) 2011 Thiago Macieira <thiago@kde.org>
2
// Copyright (C) 2016 Intel Corporation.
3
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5
#
ifndef
QGENERICATOMIC_H
6
#
define
QGENERICATOMIC_H
7
8
#
include
<
QtCore
/
qcompilerdetection
.
h
>
9
#
include
<
QtCore
/
qtconfigmacros
.
h
>
10
#
include
<
QtCore
/
qtypes
.
h
>
11
12
QT_BEGIN_NAMESPACE
13
14
#
if
0
15
// silence syncqt warnings
16
QT_END_NAMESPACE
17
#
pragma
qt_sync_skip_header_check
18
#
pragma
qt_sync_stop_processing
19
#
endif
20
21
template
<
int
Size>
struct
QAtomicOpsSupport
22
{
23
enum
{ IsSupported = (Size ==
sizeof
(
int
) || Size ==
sizeof
(qptrdiff)) };
24
};
25
26
template
<
typename
T>
struct
QAtomicAdditiveType
27
{
28
typedef
T
AdditiveT
;
29
static
const
int
AddScale
= 1;
30
};
31
template
<
typename
T>
struct
QAtomicAdditiveType
<T *>
32
{
33
typedef
qptrdiff
AdditiveT
;
34
static
const
int
AddScale
=
sizeof
(T);
35
};
36
37
QT_END_NAMESPACE
38
#
endif
// QGENERICATOMIC_H
QAtomicAdditiveType< T * >::AddScale
static const int AddScale
Definition
qgenericatomic.h:34
QAtomicAdditiveType< T * >::AdditiveT
qptrdiff AdditiveT
Definition
qgenericatomic.h:33
QAtomicAdditiveType
Definition
qgenericatomic.h:27
QAtomicAdditiveType::AdditiveT
T AdditiveT
Definition
qgenericatomic.h:28
QAtomicAdditiveType::AddScale
static const int AddScale
Definition
qgenericatomic.h:29
qtbase
src
corelib
thread
qgenericatomic.h
Generated on Mon Mar 10 2025 01:10:21 for Qt by
1.13.2