Re: spinlock support on loongarch64 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: spinlock support on loongarch64
Date
Msg-id 1658834.1667403455@sss.pgh.pa.us
Whole thread Raw
In response to spinlock support on loongarch64  (吴亚飞 <wuyf41619@hundsun.com>)
Responses Re: spinlock support on loongarch64
List pgsql-hackers
=?gb2312?B?zuLRx7fJ?= <wuyf41619@hundsun.com> writes:
> add spinlock support on loongarch64.

I wonder if we shouldn't just do that (ie, try to use
__sync_lock_test_and_set) as a generic fallback on any unsupported
architecture.  We could get rid of the separate stanza for RISC-V
that way.  The main thing that an arch-specific stanza could bring
is knowledge of the best data type width to use for a spinlock;
but I don't see a big problem with defaulting to "int".  We can
always add arch-specific stanzas for any machines where that's
shown to be a seriously poor choice.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Ankit Kumar Pandey
Date:
Subject: Re: Check return value of pclose() correctly
Next
From: Jehan-Guillaume de Rorthais
Date:
Subject: Re: psql: Add command to use extended query protocol