Skip to content

Commit

Permalink
ESP32: Lock Thread stack before calling GenericOpenThread::DoInit() (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 authored and pull[bot] committed Jul 12, 2024
1 parent bbe2d6d commit 1048452
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/platform/ESP32/ThreadStackManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ ThreadStackManagerImpl ThreadStackManagerImpl::sInstance;

CHIP_ERROR ThreadStackManagerImpl::_InitThreadStack()
{
CHIP_ERROR err = CHIP_NO_ERROR;
openthread_init_stack();
return GenericThreadStackManagerImpl_OpenThread<ThreadStackManagerImpl>::DoInit(esp_openthread_get_instance());
_LockThreadStack();
err = GenericThreadStackManagerImpl_OpenThread<ThreadStackManagerImpl>::DoInit(esp_openthread_get_instance());
_UnlockThreadStack();
return err;
}

CHIP_ERROR ThreadStackManagerImpl::_StartThreadTask()
Expand Down

0 comments on commit 1048452

Please sign in to comment.