Le jeudi 07 novembre 2019 à 06:47 +0100, Pierre FICHEUX via Xenomai a écrit : > I've tried it but got the pid of the "main" thread not the RT one > (that's > normal...). >
extern "C" { int cobalt_thread_pid(pthread_t); } int tid = cobalt_thread_pid(pthread_self()) but i’m not sure what you mean by the cobalt thread id vs posix thread id. IIRC they have the same value (ie, syscal(__NR_gettid) would give the same value (for rt threads), maybe at the expense of a mode switch). Regards, Julien Blanc