PsGetCurrentThreadId

VOID *__stdcall PsGetCurrentThreadId(){
  return *(VOID **)&KeGetCurrentThread()[1].CurrentRunTime;
}

Referenced by:

EtwpCovSampContextPruneModules
PnpWatchdogEtwWrite
PoShutdownBugCheck