mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
45477b791daf72d62dd0d7dbc72e8a3cb66391e5
This defines __platform_wait, __platform_notify, and __platform_wait_until for FreeBSD, making use of the _umtx_op syscall. The Linux versions of those functions only support 32-bit integers, but the FreeBSD versions use the syscall for both 32-bit and 64-bit types, as the _umtx_op supports both. We also need to change __spin_impl because it currently assumes the waitable at args._M_obj is always a __platform_wait_t. Because FreeBSD supports waiting on both 32-bit and 64-bit integers, we need a platform-specific function for loading a value from _M_obj. This adds a new __platform_load function, which does an atomic load of the right size. The Linux definition just loads an int, but for FreeBSD it depends on _M_obj_size. We also need a generic version of the function for platforms without __platform_wait, because __spin_impl is always used, even when the __waitable_state contains a condition_variable. libstdc++-v3/ChangeLog: PR libstdc++/120527 * include/bits/atomic_wait.h [__FreeBSD__] (__platform_wait_t): Define typedef. [__FreeBSD__] (__platform_wait_uses_type): Define variable template. * src/c++20/atomic.cc (__platform_load): New function. [__FreeBSD__] (_GLIBCXX_HAVE_PLATFORM_WAIT, __platform_wait) (__platform_notify, __platform_wait_until): Define. (__detail::__spin_impl): Use __platform_load. Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
30.7%
C
30.2%
Ada
14.4%
D
6.1%
Go
5.7%
Other
12.4%