-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Darwin: PlatformManagerImpl improvements (#32904)
* Small improvements to TestPlatformMgr.cpp Use NL_TEST_ASSERT_SUCCESS when checking errors Add a few more assertions * Add AtomicGlobal<T> as a thread-safe variant of Global<T> It is simply an alias for the same type if CHIP_CONFIG_GLOBALS_LAZY_INIT is not enabled, as the eager implementation of Global<T> is thread-safe anyway. Use "friend" instead of "friend class" where the type might be an alias. * Darwin: PlatformManagerImpl improvements Make PlatformMgr[Impl]() thread-safe by using an AtomicGlobal Make GetWorkQueue() thread-safe by creating the queue in the constructor Make {Start,Stop}EventLoopTask thread-safe using an atomic for state Signal the sempahore only if non-null, no matter where stop is called from Other minor tweaks * Don't reference std::call_once unless CHIP_CONFIG_GLOBALS_LAZY_INIT=1
- Loading branch information
1 parent
85388a1
commit 8f676d7
Showing
6 changed files
with
147 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.