geoffreyblake · GitHub

Commit b2633e3

committed

Add spin_delay impl to postgresql11 for arm

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • src/include/storage

Lines changed: 12 additions & 0 deletions

Original file line numberDiff line numberDiff line change

@@ -337,6 +337,18 @@ tas(volatile slock_t *lock)

337337
338338

#define S_UNLOCK(lock) __sync_lock_release(lock)

339339
340+

#define SPIN_DELAY() spin_delay()

341+
342+

static __inline__ void

343+

spin_delay(void)

344+

{

345+

/*

346+

* Test using an ISB instruction here instead of a NOP

347+

*/

348+

__asm__ __volatile__(

349+

" isb; \n");

350+

}

351+
340352

#endif /* HAVE_GCC__SYNC_INT32_TAS */

341353

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

342354

0 commit comments

Comments

 (0)

Read the original on github.com ↗