Re: spinlock support on loongarch64

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: 吴亚飞 <wuyf41619@hundsun.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2022-11-02T18:55:04Z
Lists: pgsql-hackers

Attachments

I wrote:
> So about like this, then.

After actually testing (by removing the ARM stanza on a macOS machine),
it seems that placement doesn't work, because of the default definition
of S_UNLOCK at the bottom of the "#if defined(__GNUC__)" stuff.  Putting
it inside that test works, and seems like it should be fine, since this
is a GCC-ism.

			regards, tom lane

Commits

  1. Allow use of __sync_lock_test_and_set for spinlocks on any machine.