On 28-06-08 02:49, Bruce Moffat wrote:

I am looking for a way to test whether I am running in a bottom half context or user context. There are kernel functions which may be called from both user and bottom half contex. For eg, tcp_transmit_skb, may be called from user context for first time transmission of a packet or from the timer bottom half in case of retransmission. Is there a way to check within that function whether it is currently running in user / bottom half context? Any hints greatly appreciated !

Normally you just know, but "in_softirq()" might be what you're looking for (warning, don't generalise to in_atomic() -- that's meaningless when running on a non-preemptible kernel).

Rene.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to