Hi, I am working on a project about reducing page faults of
multi-threaded programs. I am using latest Fedora core (Linux 2.6) and pthread library. In
this project, each user-level  thread (created by pthread_create()
function) needs to pass a value to the task structure in the kernel
which corresponds to the thread. The first step is getting a unique id
of the task structure of each thread. But what is this unique id? <br><br>I tried to use getpid() to get the process id of each thread
and use it as unique id. But this didnt work out since all threads in a
process share the same pid. I tried to use the thread_id returned by
pthread_create() function but this id is meaningless to the kernel.
Could anyone help me out on this? Thanks!<br clear="all"><br>-- <br>Addr: 1025N, 23rd str, APT 33,<br>         Lincoln, NE, 68503<br>Phone: (402)310-9826<br>WWW: <a href="http://cse.unl.edu/~fxian">cse.unl.edu/~fxian</a>