/* If the variable HOB was finished being flushed since the last check for a runtime cache update, this function will prevent the HOB cache from being used for future runtime cache hits.  */
VOID CheckForRuntimeCacheSync(VOID)
/* If the variable HOB was finished being flushed since the last check for a runtime cache update, this function will prevent the HOB cache from being used for future runtime cache hits.  */
VOID CheckForRuntimeCacheSync(VOID)
{
  if (mVariableRuntimeCachePendingUpdate) {
    SyncRuntimeCache ();
  }
  ASSERT (!mVariableRuntimeCachePendingUpdate);
  if (mHobFlushComplete && (mVariableRuntimeHobCacheBuffer != NULL)) {
    if (!EfiAtRuntime ()) {
      FreePages (mVariableRuntimeHobCacheBuffer, EFI_SIZE_TO_PAGES (mVariableRuntimeHobCacheBufferSize));
    }
    mVariableRuntimeHobCacheBuffer = NULL;
  }
}