HelenOS sources

sys_thread_get_id  303 kernel/generic/include/proc/thread.h extern sys_errno_t sys_thread_get_id(uspace_ptr_thread_id_t);
sys_thread_get_id   65 kernel/generic/src/syscall/syscall.c 	[SYS_THREAD_GET_ID] = (syshandler_t) sys_thread_get_id,
HelenOS homepage, sources at GitHub