chore: update the comment.

Signed-off-by: lurix <lurix@foxmail.com>
This commit is contained in:
lurix 2021-09-15 09:42:44 +00:00
parent 9c3a6901f1
commit 902efbcea9
1 changed files with 3 additions and 5 deletions

View File

@ -533,17 +533,15 @@ LITE_OS_SEC_TEXT UINT32 OsQueueMailFree(UINT32 queueID, VOID *mailPool, VOID *ma
if (!LOS_ListEmpty(&queueCB->memList)) { if (!LOS_ListEmpty(&queueCB->memList)) {
resumedTask = OS_TCB_FROM_PENDLIST(LOS_DL_LIST_FIRST(&queueCB->memList)); resumedTask = OS_TCB_FROM_PENDLIST(LOS_DL_LIST_FIRST(&queueCB->memList));
/* When enters the current branch, means the resumed task already can get a available membox, /* When enter this branch, it means the resumed task can
* so the resumedTask->msg can not be NULL. * get an available mailMem.
*/ */
resumedTask->msg = mailMem; resumedTask->msg = mailMem;
OsSchedTaskWake(resumedTask); OsSchedTaskWake(resumedTask);
LOS_IntRestore(intSave); LOS_IntRestore(intSave);
LOS_Schedule(); LOS_Schedule();
} else { } else {
/* No task waiting for the mailMem, /* No task waiting for the mailMem, so free it. */
* so free it.
*/
if (LOS_MemboxFree(mailPool, mailMem)) { if (LOS_MemboxFree(mailPool, mailMem)) {
LOS_IntRestore(intSave); LOS_IntRestore(intSave);
return LOS_ERRNO_QUEUE_MAIL_FREE_ERROR; return LOS_ERRNO_QUEUE_MAIL_FREE_ERROR;