RE: Whats bottom halfs for then?

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

 



You can (and should) manipulate _spinlocks_ in interrupt context. You cannot
touch _semaphores_ nor do anything that would imply a sleep.

BHs run with interrupts enabled and thus allow for longer processing as
opposed to an interrupt handler which must execute as fast as possible.

Florin

-----Original Message-----
From: kernelnewbies-bounce@nl.linux.org
[mailto:kernelnewbies-bounce@nl.linux.org] On Behalf Of Zeeshan Ali
Sent: Thursday, March 04, 2004 3:40 PM
To: kernelnewbies@nl.linux.org
Subject: Whats bottom halfs for then?

Hello,
  I needed to do some thing in an interrupt for which
it is necessary to lock on a spinlock. As this
could'nt/should'nt be done in an interrupt, I looked
at bottom halfs, but I was shocked to see this written
in Linux Device Drivers, 2nd ed.:

"One thing to keep in mind with bottom-half processing
is that all of the restrictions that apply to
interrupt handlers also apply to bottom halves. Thus,
bottom halves cannot sleep, cannot access user space,
and cannot invoke the scheduler."

   Please give some guidance.


=====
"The whole problem with the world is that fools and fanatics are always so
certain of themselves, but wiser people so full of doubts." --Bertrand
Russell

"We are convinced that freedom without Socialism is privilege and injustice,
and that Socialism without freedom is slavery and brutality."  from the
book: "The Political Philosophy of Bakunin".

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you're looking for faster
http://search.yahoo.com

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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