/* If Context is NULL, then ASSERT(). If CpuCount is NULL, then ASSERT(). If CpuIndex exceeds the range of all CPUs in the system, then ASSERT(). */
VOID EFIAPI SmmCpuSyncLockDoor(IN OUT SMM_CPU_SYNC_CONTEXT *Context, IN UINTN CpuIndex, OUT UINTN *CpuCount)
/* If Context is NULL, then ASSERT(). If CpuCount is NULL, then ASSERT(). If CpuIndex exceeds the range of all CPUs in the system, then ASSERT(). */
VOID EFIAPI SmmCpuSyncLockDoor(IN OUT SMM_CPU_SYNC_CONTEXT *Context, IN UINTN CpuIndex, OUT UINTN *CpuCount)
{
  ASSERT (Context != NULL);
  ASSERT (CpuCount != NULL);
  ASSERT (CpuIndex < Context->NumberOfCpus);
  Context->ArrivedCpuCountUponLock = *Context->CpuCount;
  *CpuCount = InternalLockdownSemaphore (Context->CpuCount);
  Context->ArrivedCpuCountUponLock = *CpuCount;
}