Skip to content

Why check pxCond->xIsInitialized flag twice and use critical section to prevent race condition #41

@Saiiijchan

Description

@Saiiijchan

Hi, I am try to port POSIX lab to v11.1 SMP.

I meet a problem when test pthread condition

.

The pvPortMalloc() will call vTaskSuspendAll() but vTaskSuspendaLL() CAN not be called in critical secion.

Besides, I don't understand why check pxCond->xIsInitialized flag twice on line 60 and 69.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions