Re: How to check bottom half vs user context ?

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

 



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 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