This replaces usage of SDL semaphores with condition variables.
Details
- Reviewers
- None
- Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rP22772: pthread -> std::thread (5/7) - Replace sdl semaphore with condition variable
Compile, test.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/differential/1514/display/redirect
Working version, worked around the fact thats SDL semaphores keep a count of how many times they were asked to wake up.
Removes SDL_Thread from the engine precompiled header since it's no longer necessary.
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/383/display/redirect
source/graphics/TextureManager.cpp | ||
---|---|---|
357 ↗ | (On Diff #9338) | Debug |
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/393/display/redirect
Build was aborted.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/394/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/graphics/TextureConverter.h | 71| » » FMT_DXT1, | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'classCTextureManager{' is invalid C code. Use --std or --language to configure the language. source/graphics/TextureManager.cpp | 1| /*·Copyright·(C)·2018·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2018" Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/397/display/redirect
builds without-pch
source/graphics/TextureManager.cpp | ||
---|---|---|
344 ↗ | (On Diff #9351) | SDL_Delay(x) = wait for x + some time It waits at least the specified time, but possibly longer due to OS scheduling |
source/graphics/TextureConverter.cpp | ||
---|---|---|
523 ↗ | (On Diff #9351) | probably un-necessary, I ran into an issue but it wasn't related here. |
source/graphics/TextureManager.cpp | ||
344 ↗ | (On Diff #9354) | technically a spin-loop wouldn't sleep at all... So maybe? |
source/ps/UserReport.cpp | ||
271 ↗ | (On Diff #9354) | Can't because of how condition variables work. |