Hi rtt devs
I wonder what really is the value returned by Thread::getPid(). Is it the pid, or tid ?
I see some code that i hardly understand (why not calling gettid() ?) in rtt/os/gnulinux/fosi_internal.cpp : rtos_posix_thread_wrapper
// store 'self' RTOS_TASK* task = ((ThreadInterface*)((PosixCookie*)cookie)->data)->getTask(); task->pid = syscall(SYS_gettid); assert( task->pid );
This function seems to be called upon task spawning. So i guess that : -till rtos_task_create getPid() return the process id. -after rtos_task_create getPid() return the thread id.
Is it right ?