Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ndrs-pst opened this issue May 29, 2020 · 1 comment
Closed
Labels

Comments

@ndrs-pst
Copy link

/* 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
@VladimirUmek
Copy link
Collaborator

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

@ndrs-pst ndrs-pst closed this as completed Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants