Skip to content

Commit

Permalink
Add fatal lock tracking support to unlock diagnostic (#30498)
Browse files Browse the repository at this point in the history
It's an error to try to unlock a lock without holding it. Currently we
don't have "fatal" lock diagnostics for this error; add this case.
  • Loading branch information
mspang authored and pull[bot] committed Feb 20, 2024
1 parent ccd9861 commit b91800f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ void GenericPlatformManagerImpl_POSIX<ImplClass>::_UnlockChipStack()
#if CHIP_STACK_LOCK_TRACKING_ENABLED
if (!mChipStackIsLocked)
{
ChipLogError(DeviceLayer, "_UnlockChipStack may error status");
ChipLogError(DeviceLayer, "_UnlockChipStack while unlocked");
#if CHIP_STACK_LOCK_TRACKING_ERROR_FATAL
chipDie();
#endif
}
mChipStackIsLocked = false;
#endif
Expand Down

0 comments on commit b91800f

Please sign in to comment.