We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5416

Summary: [PATCH] SDL_cond/Windows: Use system Condition Variables when SRW locks are used
Product: SDL Reporter: Joel Linn <jl>
Component: threadAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: HG 2.0   
Hardware: All   
OS: Windows (All)   
Attachments: [PATCH 1/2] Add optional suffix `_generic` to generic SDL_cond impl
[PATCH 2/2] Add SDL_cond implementation using Windows Condition Variables
[PATCH 2/2] Add SDL_cond implementation using Windows Condition Variables v2

Description Joel Linn 2020-12-25 13:03:14 UTC
The new SRW mutex implementation from bug #5378 allows to use the native system Condition Variables. In case the CriticalSection mutex implementation is used, it falls back to the generic SDL_cond implementation (I didn't add another Hint to keep the number of possible combinations down.)
Comment 1 Joel Linn 2020-12-25 13:03:35 UTC
Created attachment 4605 [details]
[PATCH 1/2] Add optional suffix `_generic` to generic SDL_cond impl
Comment 2 Joel Linn 2020-12-25 13:04:03 UTC
Created attachment 4606 [details]
[PATCH 2/2] Add SDL_cond implementation using Windows Condition Variables
Comment 3 Ozkan Sezer 2020-12-25 14:34:10 UTC
Second patch needs rebasing to current hg.
Comment 4 Joel Linn 2020-12-26 11:58:16 UTC
Created attachment 4608 [details]
[PATCH 2/2] Add SDL_cond implementation using Windows Condition Variables v2

Rebased
Comment 5 Sam Lantinga 2020-12-28 19:43:48 UTC
Patches added, thanks!
https://hg.libsdl.org/SDL/rev/2a297881a9b9
https://hg.libsdl.org/SDL/rev/f5ccd288ad7c