-
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.
Enable "are we on the right thread?" asserts on Darwin. (#20177)
A few changes here: 1) Enable chip_stack_lock_tracking on darwin. 2) Implement _IsChipStackLockedByCurrentThread on Darwin in a way that makes sense with the actual "no locks" setup there (by checking that we are on the right dispatch queue). 3) Fix controller shutdown on Darwin to not happen from outside the Matter event loop while the event loop is running. Removing the dealloc method from the Darwin controller implementation is safe because: * The only place where controllers get allocated is MTRControllerFactory's createController. * At that callsite, if initWithFactory returns nil it guarantees that it has called cleanup. * After allocation + init, we add the controller to the factory's controller list. After that the controller cannot be deallocated until we remove it from that list, which only happens in controllerShuttingDown, which is always followed by a call to cleanup.
- Loading branch information
1 parent
1f20e2b
commit c1d5431
Showing
6 changed files
with
53 additions
and
17 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
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