/* Detach a thread (thread storage can be reclaimed when thread terminates).  */
osStatus_t osThreadDetach(osThreadId_t thread_id)
/* Detach a thread (thread storage can be reclaimed when thread terminates).  */
osStatus_t osThreadDetach(osThreadId_t thread_id)
{
    EvrRtxThreadError(thread_id, (int32_t)osErrorISR);
    status = osErrorISR;
  } else {
    status = __svcThreadDetach(thread_id);
  }
  return status;
}