On Fri, 2006-08-11 at 15:20 -0400, Stephen Smalley wrote: > Rework the libselinux functions that access /proc/pid/attr to access the > per-thread nodes, and unify the code to simplify maintenance. The main glibc author has stated[1] that gettid() isn't a public function because he reserves the right to not have the user space thread tied to the kernel space thread, which would really confuse anyone using these functions... On Thu, 2006-06-08 at 09:02 -0700, Ulrich Drepper wrote: > And currently we use the same TID (for the kernel: the PID) for the > lifetime of the thread. But this could change at any time. It's an > implementation detail and if there are advantages to do some userlevel > scheduling (i.e., swap the underlying process of two threads) I'll > implement this and it'll break all code depending on the fixed > relationship. > > If they don't care and don't blame us they can use > > syscall (__NR_gettid) > > after including . But get it in writing that they > won't put it in production code. [1] This is from a semi-private mail, so I can't provide a link ... however I'm sure Ulrich will publicly state something resembling the above if you ask him. -- James Antill