fix:修复software timer线程

readsize在第一次循环后可能未被正确赋值的问题

Signed-off-by: xiaofan <xiaofan@iscas.ac.cn>
This commit is contained in:
xiaofan 2021-08-28 16:18:45 +08:00
parent 75f975c424
commit 61cbf83f5d
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) {