PsGetCurrentThreadId

VOID *__fastcall PsGetCurrentThreadId(){
  return(VOID *)*((_QWORD *)KeGetCurrentThread() + 144);
}

Referenced by:

EtwpCovSampContextPruneModules
PnpWatchdogEtwWrite
PoShutdownBugCheck