This function is declared in the kos/thread.h file.
kos/thread.h
Tid KosThreadCurrentId(void);
This function requests the TID of the calling thread.
If successful, the function returns the thread ID (TID).