PinkElephantsOnParade
PinkElephantsOnParade

Reputation: 6592

In the Linux kernel (module programming) how to get threadids from a multithreaded process?

current->pid gets the process id accessing the module...but I want the threadid from the process in a multithreaded program accessing my module. What is the call to do this? I can't find it anywhere!

Upvotes: 1

Views: 2469

Answers (1)

CrazyCasta
CrazyCasta

Reputation: 28362

The linux kernel does not see multithreaded processes in the same way as the POSIX thread library (which I assume is what you mean by thread id). The kernel has tasks which are somewhat separate processes looped together by the thread library. This paper from IBM gives a more detailed explanation.

Upvotes: 3

Related Questions