HalpFlushAndWait

NTSTATUS __stdcall HalpFlushAndWait(
        PVOID SecurityDescriptor,
        PVOID PrincipalSelfSid,
        PVOID ClientToken,
        UINT64 DesiredAccess,
        OBJECT_TYPE_LIST *ObjectTypeList,
        UINT64 ObjectTypeListLength,
        GENERIC_MAPPING *GenericMapping,
        PRIVILEGE_SET *PrivilegeSet,
        UINT64 *PrivilegeSetLength,
        UINT64 *GrantedAccess,
        INT64 *AccessStatus){
  KeSweepLocalCaches((INT64)SecurityDescriptor, PrincipalSelfSid);
  _InterlockedIncrement((volatile signed __int32 *)SecurityDescriptor);
  do
    _mm_pause();
  while( *(_DWORD *)SecurityDescriptor );
  return HalpProcessorFence();
}

Referenced by:

HaliAcpiSleep