/* If Context is NULL, then ASSERT(). If CpuIndex exceeds the range of all CPUs in the system, then ASSERT(). */
RETURN_STATUS EFIAPI SmmCpuSyncCheckOutCpu(IN OUT SMM_CPU_SYNC_CONTEXT *Context, IN UINTN CpuIndex)
/* If Context is NULL, then ASSERT(). If CpuIndex exceeds the range of all CPUs in the system, then ASSERT(). */
RETURN_STATUS EFIAPI SmmCpuSyncCheckOutCpu(IN OUT SMM_CPU_SYNC_CONTEXT *Context, IN UINTN CpuIndex)
{
  ASSERT (Context != NULL);
  ASSERT (CpuIndex < Context->NumberOfCpus);
  if (InternalWaitForSemaphore (Context->CpuCount) == MAX_UINT32) {
    return RETURN_ABORTED;
  }
  return RETURN_SUCCESS;
}