mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Provide a generic fallback for pg_compiler_barrier using an extern function.
If the compiler/arch combination does not provide compiler barriers, provide a fallback. That fallback simply consists out of a function call into a externally defined function. That should guarantee compiler barrierer semantics except for compilers that do inter translation unit/global optimization - those better provide an actual compiler barrier. Hopefully this fixes Tom's report of linker failures due to pg_compiler_barrier_impl not being provided. I'm not backpatching this commit as it builds on the new atomics infrastructure. If we decide an equivalent fix needs to be backpatched, I'll do so in a separate commit. Discussion: 27746.1420930690@sss.pgh.pa.us Per report from Tom Lane.
This commit is contained in:
@@ -32,6 +32,14 @@ pg_spinlock_barrier(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PG_HAVE_COMPILER_BARRIER_EMULATION
|
||||
void
|
||||
pg_extern_compiler_barrier(void)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PG_HAVE_ATOMIC_FLAG_SIMULATION
|
||||
|
||||
|
Reference in New Issue
Block a user