Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
88bcdf9d
Commit
88bcdf9d
authored
10 years ago
by
Andres Freund
Browse files
Options
Downloads
Patches
Plain Diff
Fix atomic ops for x86 gcc compilers that don't understand atomic intrinsics.
Per buildfarm animal locust.
parent
b64d92f1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/include/port/atomics/generic-gcc.h
+10
-3
10 additions, 3 deletions
src/include/port/atomics/generic-gcc.h
with
10 additions
and
3 deletions
src/include/port/atomics/generic-gcc.h
+
10
−
3
View file @
88bcdf9d
...
...
@@ -108,8 +108,11 @@ typedef struct pg_atomic_uint64
*/
#if defined(PG_USE_INLINE) || defined(ATOMICS_INCLUDE_DEFINITIONS)
#if !defined(PG_HAVE_ATOMIC_TEST_SET_FLAG) && \
(defined(HAVE_GCC__SYNC_CHAR_TAS) || defined(HAVE_GCC__SYNC_INT32_TAS))
#ifdef PG_HAVE_ATOMIC_FLAG_SUPPORT
#if defined(HAVE_GCC__SYNC_CHAR_TAS) || defined(HAVE_GCC__SYNC_INT32_TAS)
#ifndef PG_HAVE_ATOMIC_TEST_SET_FLAG
#define PG_HAVE_ATOMIC_TEST_SET_FLAG
static
inline
bool
pg_atomic_test_set_flag_impl
(
volatile
pg_atomic_flag
*
ptr
)
...
...
@@ -118,7 +121,9 @@ pg_atomic_test_set_flag_impl(volatile pg_atomic_flag *ptr)
/* some platform only support a 1 here */
return
__sync_lock_test_and_set
(
&
ptr
->
value
,
1
)
==
0
;
}
#endif
/* !defined(PG_HAVE_ATOMIC_TEST_SET_FLAG) && defined(HAVE_GCC__SYNC_*_TAS) */
#endif
#endif
/* defined(HAVE_GCC__SYNC_*_TAS) */
#ifndef PG_HAVE_ATOMIC_UNLOCKED_TEST_FLAG
#define PG_HAVE_ATOMIC_UNLOCKED_TEST_FLAG
...
...
@@ -153,6 +158,8 @@ pg_atomic_init_flag_impl(volatile pg_atomic_flag *ptr)
}
#endif
#endif
/* defined(PG_HAVE_ATOMIC_FLAG_SUPPORT) */
/* prefer __atomic, it has a better API */
#if !defined(PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U32) && defined(HAVE_GCC__ATOMIC_INT32_CAS)
#define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U32
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment