!287 修复software timer线程 readsize在第一次循环后可能未被正确赋值的问题

Merge pull request !287 from xfan1024/master
This commit is contained in:
openharmony_ci 2021-08-28 09:06:20 +00:00 committed by Gitee
commit 047203b7fb
1 changed files with 1 additions and 1 deletions

View File

@ -74,9 +74,9 @@ LITE_OS_SEC_TEXT VOID OsSwtmrTask(VOID)
UINT32 readSize;
UINT32 ret;
UINT64 tick;
readSize = sizeof(SwtmrHandlerItem);
for (;;) {
readSize = sizeof(SwtmrHandlerItem);
ret = LOS_QueueReadCopy(g_swtmrHandlerQueue, &swtmrHandle, &readSize, LOS_WAIT_FOREVER);
if ((ret == LOS_OK) && (readSize == sizeof(SwtmrHandlerItem))) {
if (swtmrHandle.handler == NULL) {