]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sys/stdatomic.h: be nicer to c++
authorKonstantin Belousov <kib@FreeBSD.org>
Sun, 27 Mar 2022 21:16:15 +0000 (00:16 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Mon, 28 Mar 2022 00:16:02 +0000 (03:16 +0300)
commitc1a24b9dbeade11bfeedc91996672582f6ea32f2
tree2293bfed1c12b121741db108ffbf0456ee25adc9
parent8bcffb86c7d5cff1474b14449c01388cac8cbc3d
sys/stdatomic.h: be nicer to c++

Use of stdatomic.h is undefined in C++, even the C++ 2020 standard does not
list stdatomic.h as a C library header supported by the language.  More,
there are some subtle differences between the <atomic> C++ header, and
C11+ stdatomic.h provided features.

Nonetheless, it is a quality of the implementation aspect, so let mis-users
mis-use stdatomic.h as they want, by making a compat shim for _Bool.

PR: 262683
Reported by: yuri
Reviewed by: dim, emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D34686
sys/sys/stdatomic.h