Skip to content

CMSIS-RTOS2: osMutexNew() failed with 'osMutexRobust' atrribute #41

@diverger

Description

@diverger

With CMSIS-RTOS2, when using 'osMutexNew()' with 'osMuteRobus', it will return 'NULL'. Try the code below, and you'll repeat the failure:

  static const osMutexAttr_t at = {NULL, osMutexPrioInherit | osMutexRecursive | osMutexRobust, NULL, NULL};
    osMutexId_t id;

    id = osMutexNew(&at);

    if (id == NULL)
    {
        printf("Failed to create a mutex\n");
    }

The similar code is used in Lwip 2.1.2, 'sys_arch.c', function: 'sys_mutex_new()'

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