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

Add Win32 support #2

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

LoganDark
Copy link

It was possible to compile cr_task before with the help of Cygwin, but Windows does not have pthreads. So on Windows, use Windows.h directly.

If using C11, MSVC needs the /experimental:c11atomics flag.

It was possible to compile cr_task before with the help of Cygwin,
but Windows does not have pthreads. So on Windows, use Windows.h
directly.

If using C11, MSVC needs the `/experimental:c11atomics` flag.
@rkaehn
Copy link
Owner

rkaehn commented Mar 12, 2024

I was thinking about switching to C11 <thread.h> to enable support for Windows. Apart from requiring a relatively recent compiler, are there reasons I might not know about to prefer <Windows.h> for this?

@LoganDark
Copy link
Author

LoganDark commented Mar 12, 2024

I was thinking about switching to C11 <thread.h> to enable support for Windows. Apart from requiring a relatively recent compiler, are there reasons I might not know about to prefer <Windows.h> for this?

I was planning to try threads.h next, I just need to update my SDK first, since it's older than 17.8, which was only 6 months ago.

By the way, this PR technically conflicts with #1 since that one has to indent a small section of code that's touched here, but I'll fix the conflict for you if/once it comes up.

LoganDark added a commit to LoganDark/cr_task.h that referenced this pull request Mar 12, 2024
This was only really implemented on platforms like Windows around
6 months ago, but it seems to work everywhere *now* as long as you're
using a recent enough compiler.

Closes rkaehn#2
@LoganDark LoganDark marked this pull request as draft March 12, 2024 10:30
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

Successfully merging this pull request may close these issues.

2 participants