Wrong expression use : mp->sem == NULL in osMemoryPoolNew (cmsis_os2.c)
ndrs-pst opened this issue · comments
Pisit Sawangvonganan commented
/* 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
Vladimir Umek commented
Thanks for spotting the problem! Please check the referenced commit for a fix.