[go: up one dir, main page]

Skip to content

Commit

Permalink
Add spin_delay impl to postgresql11 for arm
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffreyblake committed Nov 1, 2021
1 parent 5dd0674 commit b2633e3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/include/storage/s_lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,18 @@ tas(volatile slock_t *lock)

#define S_UNLOCK(lock) __sync_lock_release(lock)

#define SPIN_DELAY() spin_delay()

static __inline__ void
spin_delay(void)
{
/*
* Test using an ISB instruction here instead of a NOP
*/
__asm__ __volatile__(
" isb; \n");
}

#endif /* HAVE_GCC__SYNC_INT32_TAS */
#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */

Expand Down

0 comments on commit b2633e3

Please sign in to comment.