Re: Can current macro be accessed from interrupt context?

From: Valdis . Kletnieks
Date: Thu Oct 22 2009 - 11:17:12 EST


On Thu, 22 Oct 2009 04:10:49 PDT, "Leonidas ." said:

> My use case is to get process id from any context with CONFIG_4KSTACKS = 0 or 1.

You *do* realize that if you're in interrupt context, the value of 'current'
probably has absolutely nothing to do with the interrupt? The process/thread
that is responsible for an I/O interrupt is probably in a blocked state waiting
for the I/O to complete, and the *running* process is often some other process.
And for some interrupts (timer, etc), all bets are off...

So given that the process ID is quite often totally pointless, what were you
trying to accomplish by getting the process ID?

Attachment: pgp00000.pgp
Description: PGP signature