/* Get available stack space of a thread based on stack watermark recording during execution.  */
static uint32_t svcRtxThreadGetStackSpace(osThreadId_t thread_id)
/* Get available stack space of a thread based on stack watermark recording during execution.  */
static uint32_t svcRtxThreadGetStackSpace(osThreadId_t thread_id)
{
    EvrRtxThreadGetStackSpace(thread, 0U);
    return 0U;
  }
  if ((osRtxConfig.flags & osRtxConfigStackWatermark) == 0U) {
    EvrRtxThreadGetStackSpace(thread, 0U);
    return 0U;
  }
  stack = thread->stack_mem;
  if (*stack++ == osRtxStackMagicWord) {
    for (space = 4U; space < thread->stack_size; space += 4U) {
      if (*stack++ != osRtxStackFillPattern) {
        break;
      }
    }
  } else {
    space = 0U;
  }
  EvrRtxThreadGetStackSpace(thread, space);
  return space;
}