NtCurrentThreadId - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTPSAPI_H
// Processes
#if (PHNT_MODE != PHNT_MODE_KERNEL)

#define NtCurrentThreadId() (NtCurrentTeb()->ClientId.UniqueThread)

#endif
#endif

View code on GitHub

This macro is a native equivalent of the GetCurrentThreadId function.