Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC 9.x or 10.x Win32 Thread #52

Closed
iceman50 opened this issue Aug 5, 2023 · 11 comments
Closed

GCC 9.x or 10.x Win32 Thread #52

iceman50 opened this issue Aug 5, 2023 · 11 comments

Comments

@iceman50
Copy link

iceman50 commented Aug 5, 2023

I was wondering if by some small chance you had a 9.x or 10.x that has win32 threading?

@nenin-sc
Copy link

nenin-sc commented Aug 5, 2023

@iceman50
Copy link
Author

iceman50 commented Aug 6, 2023

I was actually asking for a specific build as I've seen others have successfully done in the past. I am not aware of MinGW-w64 builds with GCC 9.x or 10.x with Win32 threads available anywhere and that's why I was asking.

@nenin-sc
Copy link

nenin-sc commented Aug 6, 2023

I've seen others have successfully done in the past

At my best knowledge and first hand experience all build before gcc 13 had stub for Win32 threads, without implementation. While meganz proposed solution many years ago, by some reasons developers of the GCC implemented it in last version only. As far as I understood, key issue was fact that threads are part not of MinGW64-w, but of the standard C++ lib of GCC and GCC developers was not hurry to implement them, may be because of (c) issues.
So for simple cases there are third-party patches, but there is no guarantee for 100% functionality required by standard.
There is some discussion about: meganz/mingw-std-threads#57

@starg2
Copy link
Contributor

starg2 commented Aug 7, 2023

@iceman50, do you want gcc 9.x or 10.x with win32 threading as-is (without std::thread implementation) or with win32 native std::thread implementation backported?

As @nenin-sc mentioned, the win32 thread model gained support for std::thread only since gcc 13.

@nenin-sc
Copy link

nenin-sc commented Aug 7, 2023

@iceman50, do you want gcc 9.x or 10.x with win32 threading as-is (without std::thread implementation) or with win32 native std::thread implementation backported?

Just in case: it might be interesting to have XP-compatible back-port. At least for me :)

@starg2
Copy link
Contributor

starg2 commented Aug 7, 2023

Just in case: it might be interesting to have XP-compatible back-port. At least for me :)

AFAIK, the win32 threading implementation in gcc 13 depends on CONDITION_VARIABLE, introduced in Windows Vista.

@nenin-sc
Copy link

nenin-sc commented Aug 7, 2023

introduced in Windows Vista.

So I still stay on gcc 9 with meganz patch. :(

@iceman50
Copy link
Author

iceman50 commented Aug 7, 2023

I am looking for win32 threading as-is no backport, and with the MSVCRT not the UCRT.

@nenin-sc
Copy link

nenin-sc commented Aug 8, 2023

win32 threading as-is

Lets make things clear: win32 threading is:

  1. std::thread implemented on top of Win32 API threading functions
  2. Win32 API threading functions

In first case there are two options:

  1. Using patches I listed
  2. Back-porting from GCC 13

In second case you always can use Win API form MinGW.

Concerning UCRT vs. MSVCRT: up to you, but MSVCRT is some strange set of dlls, which originated from depth of the 90th (VC6) and it is not actual C runtime for last 20 years. It is used by MS by obscure reasons and might simply disappear after next safety patch. UCRT can be installed down to WinXP and it is real C runtime from MS, safe and optimized as good as it can be done in Windows.

@starg2
Copy link
Contributor

starg2 commented Aug 8, 2023

I am looking for win32 threading as-is no backport, and with the MSVCRT not the UCRT.

Got it. Fortunately, gcc 10.5.0 is still available here: https://github.com/starg2/mingw-builds/actions/runs/5485122896

@niXman
Copy link
Owner

niXman commented Sep 13, 2023

@iceman50 please close the issue if you have no additional questions.

@niXman niXman closed this as completed Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants