ARM-software / CMSIS-FreeRTOS

FreeRTOS adaptation for CMSIS-RTOS Version 2

Home Page:https://arm-software.github.io/CMSIS-FreeRTOS/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong expression use : mp->sem == NULL in osMemoryPoolNew (cmsis_os2.c)

ndrs-pst opened this issue · comments

/* Create a semaphore (max count == initial count == block_count) */
#if (configSUPPORT_STATIC_ALLOCATION == 1)
  mp->sem = xSemaphoreCreateCountingStatic (block_count, block_count, &mp->mem_sem);
#elif (configSUPPORT_DYNAMIC_ALLOCATION == 1)
  mp->sem = xSemaphoreCreateCounting (block_count, block_count);
#else
  mp->sem == NULL; /* Should be "=" instead of "==" */
#endif

Thanks for spotting the problem! Please check the referenced commit for a fix.