Re: Can you use current->pid at the driver level

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

 



On Thu, 7 Jun 2007, Devvrat Tripathi wrote:

> I wanted to ask you if current pid will work at the driver level. i used 
> in pci-gart.c to get the processes which are using DMA transfer but 
> stragely i get 0 sometimes and sometime proper pid's. I cant figure out 
> the reason for this strange behaviour. Is there a better way to find out 
> who actually initiated the IO transfer which is using the dma_ops 
> functions. Can anybody please help me in this regard.

zero is valid PID (belongs to idle task).

The meaning of current->pid is meaningful only in process context. If the 
code you are looking at is running in the interrupt context, the 
current->pid is going to be pretty random.

-- 
Jiri Kosina

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux