/* Give the semaphore, setting its count to 1, meaning that it's available.  */
void TbxMbOsalSemGive(tTbxMbOsalSem sem, uint8_t fromIsr)
/* Give the semaphore, setting its count to 1, meaning that it's available.  */
void TbxMbOsalSemGive(tTbxMbOsalSem sem, uint8_t fromIsr)
{
  TBX_UNUSED_ARG(fromIsr);
  TBX_ASSERT(sem != NULL);
  if (sem != NULL)
  {
    tTbxMbOsalSemCtx * semCtx = (tTbxMbOsalSemCtx *)sem;
    TBX_ASSERT(semCtx->type == TBX_MB_OSAL_SEM_CONTEXT_TYPE);
    TbxCriticalSectionEnter();
    semCtx->count = 1U;
    TbxCriticalSectionExit();
  }
}