AnsweredAssumed Answered

cmsis_os.c osPoolAlloc error?

Question asked by los.vladimir on Jul 19, 2016
Latest reply on Feb 7, 2018 by Richard I
lines in osPoolAlloc function:
index = pool_id->currentIndex + i;
if (index >= pool_id->pool_sz) {
  index = 0;
}
must be replaced with:
index = (pool_id->currentIndex + i) % pool_id->pool_sz;

Outcomes