Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a module which is accessed for read/write operations to a proc file. I know I can get current process id using current->pid, but is there a way to get the current thread id that is accessing the module? The process accessing the module has multiple threads.


share|improve this question
Answer could depend on which thread library you use. The old pthreads library created each thread as a process with a pid that was viewable by the ps command. –  sawdust Oct 1 '12 at 21:43
I'm curious why do you need to know in a driver a PID of the process that read/write drivers proc entry? –  Serge Oct 1 '12 at 23:35
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.