PsSetIoPriorityThread

_IO_PRIORITY_HINT __stdcall PsSetIoPriorityThread(_ETHREAD *Thread, _IO_PRIORITY_HINT IoPriority){
  signed __int32 bf_0; 
  unsigned __int32 v3; 
  int v4; 

  bf_0 = Thread->$F45B4AB16F4980293A53858F720DB0B5::_bf_0;
  do
  {
    v3 = bf_0;
    bf_0 = _InterlockedCompareExchange(
             (volatile signed __int32 *)&Thread->1296,
             (IoPriority << 9) | bf_0 & 0xFFFFF1FF,
             bf_0);
  }
  while( bf_0 != v3 );
  v4 = (v3 >> 9) & 7;
  if( IoPriority != v4 )
    KeAbProcessBaseIoPriorityChange(&Thread->Tcb, (_IO_PRIORITY_HINT)v4, IoPriority);
  return v4;
}

Referenced by:

CcApplyLowIoPriorityToThread
CmpSetIoPriorityThread
IoApplyPriorityInfoThread
IoSetIoPriorityHintIntoThread
NtSetInformationProcess
NtSetInformationThread