[PATCH] Add loongarch64 native spin lock. - Mailing list pgsql-hackers

From YANG Xudong
Subject [PATCH] Add loongarch64 native spin lock.
Date
Msg-id 2d5ac8b9-f720-095a-a7a8-74b526ce83bd@ymatrix.cn
Whole thread Raw
Responses Re: [PATCH] Add loongarch64 native spin lock.
List pgsql-hackers
Hi,

This patch set tries to add loongarch64 native spin lock to postgresql.

- [PATCH 1/2] implements a loongarch64 native spin lock.
- [PATCH 2/2] fixes s_lock_test to make it runnable via `make check'.

The patch set is tested on my Loongson 3A5000 machine with Loong Arch 
Linux and GCC 13.1.0 with default ./configure with no options.

Output of `make check' in src/backend/storage/lmgr is attached.

See:
[1]: 
https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#atomic-memory-access-instructions
[2]: 

https://github.com/torvalds/linux/blob/f1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6/arch/loongarch/include/asm/cmpxchg.h#L12

----
YANG Xudong
Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Autogenerate some wait events code and documentation
Next
From: Tomas Vondra
Date:
Subject: Re: Add LZ4 compression in pg_dump