Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.arcetri.astro.it/irlab/doc/library/linux/khg/HyperNews/get/devices/devices/15.html
Дата изменения: Thu Mar 23 12:37:18 2000 Дата индексирования: Wed Sep 15 04:21:27 2010 Кодировка: Поисковые слова: earth's atmosphere |
Can someone expain when and how I use mark_bh(). I am assuming from general knowledge that it mark the end of the interrupt service routine and allows a context switch in following code. Here is why I want to know. I have a network driver in which it would be advantagous to be able to sleep during code initiated by an interrupt. For example a piece of data is received by the device which is passed to a kernel daemon via a character device inode and a select call. I then want to wait for the daemon to respond or timeout. The question is, if I call mark_bh(NET_BH) IMMEDIATE_BH?? before I sleep, can I sleep or do I Aiee...Killing Interrupt handler, Idle task may not sleep? mark_bh doesn't seem to be explained anywhere but is used by many net drivers for reasons I don't understand. Is there somewhere I can look for this information? My only obvious alternative at this point is to create a request queue of some sort and respond to activity on the character device. The problem is that I can't really continue transferring data until I get a response from the daemon. Any thoughts? Erik Petersen. |