unlocked-spin.patch

text/x-diff

Filename: unlocked-spin.patch
Type: text/x-diff
Part: 2
Message: Re: XLogInsert scaling, revisited

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/include/storage/s_lock.h 1 0
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index ce45ffe..a7e0436 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -199,6 +199,7 @@ spin_delay(void)
 typedef unsigned char slock_t;
 
 #define TAS(lock) tas(lock)
+#define TAS_SPIN(lock)	(*(lock) ? 1 : TAS(lock))
 
 static __inline__ int
 tas(volatile slock_t *lock)