Spin Function
The database does not invoke Pthread_spinlock to monitor spin mutex locks, detect deadlocks, and control spin time. Instead, the database uses the customized mode. The spin operation implementation varies according to the platform.
- x86 platform
static __inline__ void pg_spin_delay_impl(void) { __asm__ __volatile__(" rep; nop \n"); } - AArch64 platform (rep command is not supported)
define pg_spin_delay_impl() ((void)0)
Parent topic: Atomic Operations