Return the kernel thread id (gettid / pthread_threadid_np / GetCurrentThreadId). threading.get_native_id and Thread.native_id follow once the function exists. Assisted-by: Grok:4.6