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

Commitf5c1167

Browse files
committed
For ppc gcc, implement 64-bit compare_exchange and fetch_add with asm.
While xlc defines __64BIT__, gcc does not. Due to this oversight incommit30ee5d1, gcc builds continuedimplementing 64-bit atomics by way of intrinsics. Back-patch to v13,where that commit first appeared.Reviewed by Tom Lane.Discussion:https://postgr.es/m/20201011051043.GA1724101@rfd.leadboat.com
1 parent80f8eb7 commitf5c1167

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ typedef struct pg_atomic_uint32
3232
}pg_atomic_uint32;
3333

3434
/* 64bit atomics are only supported in 64bit mode */
35-
#ifdef__64BIT__
35+
#ifSIZEOF_VOID_P >=8
3636
#definePG_HAVE_ATOMIC_U64_SUPPORT
3737
typedefstructpg_atomic_uint64
3838
{
3939
volatileuint64valuepg_attribute_aligned(8);
4040
}pg_atomic_uint64;
4141

42-
#endif/* __64BIT__ */
42+
#endif
4343

4444
/*
4545
* This mimics gcc __atomic_compare_exchange_n(..., __ATOMIC_SEQ_CST), but

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp