Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Aug 2018 14:12:55 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Konstantin Belousov <kib@freebsd.org>
Cc:        mmacy@FreeBSD.org, svn-src-head@freebsd.org, freebsd-hackers@freebsd.org, freebsd-amd64@freebsd.org
Subject:   Re: svn commit: r335873 - in head: . sys/amd64/amd64 sys/amd64/include  sys/conf sys/i386/i386 sys/i386/include sys/sys sys/vm
Message-ID:  <3910BFAA-45CF-4A5F-AF08-A47585BFF9C2@yahoo.com>
In-Reply-To: <20180801075704.GS40119@kib.kiev.ua>
References:  <226713AF-FC51-4A44-93E1-8264B1BD2C8A@yahoo.com> <20180801075704.GS40119@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2018-Aug-1, at 12:57 AM, Konstantin Belousov <kib at freebsd.org> =
wrote:
>=20
> On Tue, Jul 31, 2018 at 06:46:31PM -0700, Mark Millard via =
freebsd-amd64 wrote:
>>> Author: mmacy
>>> Date: Mon Jul  2 19:48:38 2018
>>> New Revision: 335873
>>> URL:=20
>>> https://svnweb.freebsd.org/changeset/base/335873
>>>=20
>>>=20
>>> Log:
>>>  inline atomics and allow tied modules to inline locks
>>>=20
>>>  - inline atomics in modules on i386 and amd64 (they were always
>>>    inline on other arches)
>>>  - allow modules to opt in to inlining locks by specifying
>>>    MODULE_TIED=3D1 in the makefile
>>=20
>> I recently found the following about ABI incompatibilities
>> between clang and gcc relative to C11 language based
>> atomics:
>>=20
>> https://bugs.llvm.org/show_bug.cgi?id=3D26462
>>=20
>> 26462 ??? GCC/clang C11 _Atomic incompatibility
>>=20
>>=20
>> So are there implications about building the kernel
>> vs. modules that overall mix the toolchains once
>> modules are loaded? Do the toolchains need to match,
>> at least for amd64 and i386 TARGET_ARCH 's?
> This is irrelevant since kernel does not use C11 atomics, we roll
> our own version, which tries to follow C11 model.
>=20
> Lack of the ABI for atomics is one of the reason to not use compiler
> C11 atomics in kernel and C runtime.

Thanks for the information: good to know.


There are other things around that use C11 atomics, such as
in:

src/contrib/ofed/librdmacm/

(This is part of why https://reviews.freebsd.org/D16585 is
out for updating stdatomic.h (and sys/cdefs.h ): so that
fairly modern gcc vintages can build world with such
involved.)


=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3910BFAA-45CF-4A5F-AF08-A47585BFF9C2>