mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-02 00:06:27 +08:00
On 32-bit targets where userspace has switched to 64-bit time_t, we cannot pass struct timespec to SYS_futex or SYS_clock_gettime, because the userspace definition of struct timespec will not match what the kernel expects. We use the existence of the SYS_futex_time64 or SYS_clock_gettime_time64 macros to imply that userspace *might* have switched to the new timespec definition. This is a conservative assumption. It's possible that the new syscall numbers are defined in the libc headers but that timespec hasn't been updated yet (as is the case for glibc currently). But using the alternative struct with two longs is still OK, it's just redundant if userspace timespec still uses a 32-bit time_t. We also check that SYS_futex_time64 != SYS_futex so that we don't try to use a 32-bit tv_sec on modern targets that only support the 64-bit system calls and define the old macro to the same value as the new one. We could possibly check #ifdef __USE_TIME_BITS64 to see whether userspace has actually been updated, but it's not clear if user code is meant to inspect that or if it's only for libc internal use. libstdc++-v3/ChangeLog: PR libstdc++/93421 * src/c++11/chrono.cc [_GLIBCXX_USE_CLOCK_GETTIME_SYSCALL] (syscall_timespec): Define a type suitable for SYS_clock_gettime calls. (system_clock::now(), steady_clock::now()): Use syscall_timespec instead of timespec. * src/c++11/futex.cc (syscall_timespec): Define a type suitable for SYS_futex and SYS_clock_gettime calls. (relative_timespec): Use syscall_timespec instead of timespec. (__atomic_futex_unsigned_base::_M_futex_wait_until): Likewise. (__atomic_futex_unsigned_base::_M_futex_wait_until_steady): Likewise. |
||
---|---|---|
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libhsail-rt | ||
libiberty | ||
libitm | ||
libobjc | ||
liboffloadmic | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING3 | ||
COPYING3.LIB | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
lt~obsolete.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
symlink-tree | ||
test-driver | ||
ylwrap |
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.