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 - [PATCH] SDL_cond/Windows: Use system Condition Variables when SRW locks are used
Summary: [PATCH] SDL_cond/Windows: Use system Condition Variables when SRW locks are used
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: thread (show other bugs)
Version: HG 2.0
Hardware: All Windows (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-25 13:03 UTC by Joel Linn
Modified: 2020-12-28 19:43 UTC (History)
1 user (show)

See Also:


Attachments
[PATCH 1/2] Add optional suffix `_generic` to generic SDL_cond impl (19.65 KB, patch)
2020-12-25 13:03 UTC, Joel Linn
Details | Diff
[PATCH 2/2] Add SDL_cond implementation using Windows Condition Variables (16.24 KB, patch)
2020-12-25 13:04 UTC, Joel Linn
Details | Diff
[PATCH 2/2] Add SDL_cond implementation using Windows Condition Variables v2 (16.16 KB, patch)
2020-12-26 11:58 UTC, Joel Linn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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