mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
On Windows a successful `sched_yield()` detection requires mingw-w64 built with POSIX threads (not Win32 threads) and GCC (not llvm/clang). (linking to `winpthread` via custom options may also work.) In CMake builds, it was pre-cached as unavailable before this patch. When detected (via autotools), it got only used for Windows XP or older targets combined with a non-GCC, non-clang compiler that doesn't support `__builtin_ia32_pause()`, or with the Intel C compiler. According to `lib/easy_lock.h`. mingw-w64 only supports GCC and clang, leaving a very narrow chance when `shed_yield()` gets called on Windows. Even then, `sched_yield()` is implemented in `winpthread` as `Sleep(0)`, which may or not be a useful. It's also trivial to implement locally if it is, and such rare build combination is also deemed useful. Thus, this patch marks `sched_yields()` permanently unavailable on the Windows platform also with autotools, and instead of pre-caching, skip this feature check with CMake. This syncs `HAVE_SCHED_YIELDS` between builds methods on Windows. Follow-up to |
||
|---|---|---|
| .. | ||
| cmake_uninstall.cmake.in | ||
| CMakeConfigurableFile.in | ||
| curl-config.cmake.in | ||
| CurlSymbolHiding.cmake | ||
| CurlTests.c | ||
| FindBearSSL.cmake | ||
| FindBrotli.cmake | ||
| FindCares.cmake | ||
| FindGSS.cmake | ||
| FindLDAP.cmake | ||
| FindLibgsasl.cmake | ||
| FindLibidn2.cmake | ||
| FindLibpsl.cmake | ||
| FindLibrtmp.cmake | ||
| FindLibssh2.cmake | ||
| FindLibssh.cmake | ||
| FindLibuv.cmake | ||
| FindMbedTLS.cmake | ||
| FindMSH3.cmake | ||
| FindNettle.cmake | ||
| FindNGHTTP2.cmake | ||
| FindNGHTTP3.cmake | ||
| FindNGTCP2.cmake | ||
| FindQuiche.cmake | ||
| FindRustls.cmake | ||
| FindWolfSSH.cmake | ||
| FindWolfSSL.cmake | ||
| FindZstd.cmake | ||
| Macros.cmake | ||
| OtherTests.cmake | ||
| PickyWarnings.cmake | ||
| Utilities.cmake | ||
| win32-cache.cmake | ||