Re: Thread_Id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> And you certainly shouldn't be using gettid () syscall in NPTL, as it 
> is just an implementation detail that there is a 1:1 mapping between 
> NPTL threads and kernel threads.  It can change at any time.

Maybe I missed the point, but I thought the 1:1 mapping between NPTL
threads and kernel threads is one of the advantages of NPTL and the idea
of a userland scheduler is quite dead. 

So please let gettid do what man gettid assures:
gettid  returns the thread ID of the current process. This is equal to
the process ID (as returned by getpid(2)), unless the process is  part
of  a thread group (created by specifying the CLONE_THREAD flag to the
clone(2) system call). All processes in the same thread group have the
same PID, but each one has a unique TID.

Bene

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux