ThreadUtil ships a scope lock and a mutex implementation, which can be removed since we now have these in the standard library.
This lets us clean up this header which get included everywhere (through profiler includes).
Details
- Reviewers
- None
- Group Reviewers
Windows Developers Restricted Owners Package (Owns No Changed Paths) - Commits
- rP22344: Clean up ThreadUtil, use standard C++11 constructs instead of custom ones.
Compile on all platforms
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- temp
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 7787 Build 12679: Vulcan Build Jenkins Build 12678: arc lint + arc unit
Event Timeline
Build failure - The Moirai have given mortals hearts that can endure.
Linter detected issues: Executing section Source... source/ps/CConsole.h | 1| /*·Copyright·(C)·2015·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2015" source/soundmanager/items/CSoundItem.cpp | 1| /*·Copyright·(C)·2015·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2015" source/ps/XML/RelaxNG.cpp | 1| /*·Copyright·(C)·2015·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2015" source/soundmanager/items/CSoundBase.cpp | 1| /*·Copyright·(C)·2015·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2015" source/soundmanager/SoundManager.h | 1| /*·Copyright·(C)·2017·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2017" source/soundmanager/SoundManager.cpp | 1| /*·Copyright·(C)·2018·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2018" source/ps/Profiler2.h | 1| /*·Copyright·(C)·2016·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2016" source/tools/atlas/GameInterface/MessagesSetup.h | 1| /*·Copyright·(C)·2009·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2009" source/tools/atlas/GameInterface/MessagesSetup.h | 31| { | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when no macros are defined. source/tools/atlas/GameInterface/MessagesSetup.h | 211| } | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'. source/tools/atlas/GameInterface/MessagesSetup.h | 31| { | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when these macros are defined: '_MSC_VER'. source/graphics/MapGenerator.cpp | 1| /*·Copyright·(C)·2018·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2018" source/ps/UserReport.cpp | 1| /*·Copyright·(C)·2018·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2018" source/ps/CLogger.h | 1| /*·Copyright·(C)·2015·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2015" source/soundmanager/items/CSoundBase.h | 1| /*·Copyright·(C)·2015·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2015" source/ps/CLogger.cpp | 1| /*·Copyright·(C)·2017·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2017" source/ps/ConfigDB.cpp | 1| /*·Copyright·(C)·2018·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2018" source/ps/Profiler2.cpp | 1| /*·Copyright·(C)·2018·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2018" source/ps/Profile.cpp | 1| /*·Copyright·(C)·2011·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2011" source/tools/atlas/GameInterface/MessagePasserImpl.cpp | 1| /*·Copyright·(C)·2013·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2013" source/tools/atlas/GameInterface/MessagePasserImpl.cpp | 211| The line belonging to the following result cannot be printed because it refers to a line that doesn't seem to exist in the given file. | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'. source/soundmanager/items/CBufferItem.cpp | 1| /*·Copyright·(C)·2015·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2015" source/ps/ThreadUtil.cpp | 1| /*·Copyright·(C)·2010·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2010" source/network/NetStats.cpp | 1| /*·Copyright·(C)·2016·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2016" source/network/NetStats.h | 1| /*·Copyright·(C)·2016·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2016" source/graphics/MapGenerator.h | 1| /*·Copyright·(C)·2018·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2018" source/ps/CConsole.cpp | 1| /*·Copyright·(C)·2016·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2016" source/tools/atlas/GameInterface/MessagePasserImpl.h | 1| /*·Copyright·(C)·2009·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2009" Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1489/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/tools/atlas/GameInterface/MessagesSetup.h | 31| { | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when no macros are defined. source/tools/atlas/GameInterface/MessagesSetup.h | 211| } | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'. source/tools/atlas/GameInterface/MessagesSetup.h | 31| { | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when these macros are defined: '_MSC_VER'. source/tools/atlas/GameInterface/MessagePasserImpl.cpp | 211| The line belonging to the following result cannot be printed because it refers to a line that doesn't seem to exist in the given file. | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'. Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1531/display/redirect
@Stan Any chance you'd try compiling this? I'd like to commit it but I want a test on windows first.
I got these
Profiler2.h(454): error C3646: 'm_TLS': unknown override specifier
Profiler2.h(454): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
source/ps/ThreadUtil.h | ||
---|---|---|
21 | I think they were defined here |
source/ps/Profiler2.h | ||
---|---|---|
80 | Adding "lib/posix/posix_pthread.h" fixes the build for me. |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/tools/atlas/GameInterface/MessagesSetup.h | 31| { | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when no macros are defined. source/tools/atlas/GameInterface/MessagesSetup.h | 211| } | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'. source/tools/atlas/GameInterface/MessagesSetup.h | 31| { | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when these macros are defined: '_MSC_VER'. source/tools/atlas/GameInterface/MessagePasserImpl.cpp | 211| The line belonging to the following result cannot be printed because it refers to a line that doesn't seem to exist in the given file. | | [MAJOR] CPPCheckBear (syntaxError): | | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'. Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1617/display/redirect