Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite7075a3

Browse files
committed
Use C11 alignas in pg_atomic_uint64 definitions
They were already using pg_attribute_aligned. This replaces that withalignas and moves that into the required syntactic position. Thisends up making these three atomics implementations appear a bit moreconsistent, but shouldn't change anything otherwise.Reviewed-by: Chao Li <li.evan.chao@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/46f05236-d4d4-4b4e-84d4-faa500f14691%40eisentraut.org
1 parent519fa04 commite7075a3

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

‎src/include/port/atomics/arch-ppc.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ typedef struct pg_atomic_uint32
3636
#definePG_HAVE_ATOMIC_U64_SUPPORT
3737
typedefstructpg_atomic_uint64
3838
{
39-
volatileuint64valuepg_attribute_aligned(8);
39+
alignas(8)volatileuint64value;
4040
}pg_atomic_uint64;
4141

4242
#endif

‎src/include/port/atomics/generic-gcc.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,9 @@ typedef struct pg_atomic_uint32
100100
&& (defined(HAVE_GCC__ATOMIC_INT64_CAS)|| defined(HAVE_GCC__SYNC_INT64_CAS))
101101

102102
#definePG_HAVE_ATOMIC_U64_SUPPORT
103-
104103
typedefstructpg_atomic_uint64
105104
{
106-
volatileuint64valuepg_attribute_aligned(8);
105+
alignas(8)volatileuint64value;
107106
}pg_atomic_uint64;
108107

109108
#endif/* defined(HAVE_GCC__ATOMIC_INT64_CAS) || defined(HAVE_GCC__SYNC_INT64_CAS) */

‎src/include/port/atomics/generic-msvc.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ typedef struct pg_atomic_uint32
3737
}pg_atomic_uint32;
3838

3939
#definePG_HAVE_ATOMIC_U64_SUPPORT
40-
typedefstructpg_attribute_aligned(8)pg_atomic_uint64
40+
typedefstructpg_atomic_uint64
4141
{
42-
volatileuint64value;
42+
alignas(8)volatileuint64value;
4343
}pg_atomic_uint64;
4444

4545

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp