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

Commitf4f4f69

Browse files
committed
Sync 9.2 and 9.3 versions of barrier.h with 9.4's version.
We weren't particularly maintaining barrier.h before 9.4, because nothingwas using it in those branches. Well, nothing until commit37de8de gotback-patched. That broke 9.2 and 9.3 for some non-mainstream platformsthat we haven't been testing in the buildfarm, including icc on ia64,HPPA, and Alpha.This commit effectively back-patches commitse5592c6,89779bf,and747ca66, though I did it just by copying the file (less copyrightdate updates) rather than by cherry-picking those commits.Per an attempt to run gaur and pademelon over old branches they'venot been run on since ~2013.
1 parent6e53bb4 commitf4f4f69

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎src/include/storage/barrier.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ extern slock_t dummy_spinlock;
5353
/*
5454
* icc defines __GNUC__, but doesn't support gcc's inline asm syntax
5555
*/
56+
#if defined(__ia64__)|| defined(__ia64)
57+
#definepg_memory_barrier()__mf()
58+
#elif defined(__i386__)|| defined(__x86_64__)
5659
#definepg_memory_barrier()_mm_mfence()
60+
#endif
61+
5762
#definepg_compiler_barrier()__memory_barrier()
5863
#elif defined(__GNUC__)
5964

@@ -112,8 +117,12 @@ extern slock_t dummy_spinlock;
112117
* read barrier to cover that case. We might need to add that later.
113118
*/
114119
#definepg_memory_barrier()__asm__ __volatile__ ("mb" : : : "memory")
115-
#definepg_read_barrier()__asm__ __volatile__ ("rmb" : : : "memory")
120+
#definepg_read_barrier()__asm__ __volatile__ ("mb" : : : "memory")
116121
#definepg_write_barrier()__asm__ __volatile__ ("wmb" : : : "memory")
122+
#elif defined(__hppa)|| defined(__hppa__)/* HP PA-RISC */
123+
124+
/* HPPA doesn't do either read or write reordering */
125+
#definepg_memory_barrier()pg_compiler_barrier()
117126
#elif__GNUC__>4|| (__GNUC__==4&&__GNUC_MINOR__ >=1)
118127

119128
/*
@@ -148,7 +157,7 @@ extern slock_t dummy_spinlock;
148157
* fence. But all of our actual implementations seem OK in this regard.
149158
*/
150159
#if !defined(pg_memory_barrier)
151-
#definepg_memory_barrier(x) \
160+
#definepg_memory_barrier() \
152161
do { S_LOCK(&dummy_spinlock); S_UNLOCK(&dummy_spinlock); } while (0)
153162
#endif
154163

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp