msleep() in interrupt handler?

Woody Wu narkewoody at gmail.com
Thu Aug 20 01:45:34 EDT 2015


On Thursday, August 20, 2015, Jeff Haran <Jeff.Haran at citrix.com> wrote:

>
>
>
>
> *From:* kernelnewbies-bounces at kernelnewbies.org
> <javascript:_e(%7B%7D,'cvml','kernelnewbies-bounces at kernelnewbies.org');>
> [mailto:kernelnewbies-bounces at kernelnewbies.org
> <javascript:_e(%7B%7D,'cvml','kernelnewbies-bounces at kernelnewbies.org');>]
> *On Behalf Of *Woody Wu
> *Sent:* Wednesday, August 19, 2015 4:47 PM
> *To:* kernelnewbies
> *Subject:* msleep() in interrupt handler?
>
>
>
> Hi List,
>
>
>
> What will happen if call msleep() in an interrupt handler? I knew the
> msleep() will cause the calling process to sleep, but in the context of
> interruption, there is no process, so I am wondering what is getting
> 'sleep' in this situation.
>
>
>
> -woody
>
>
>
> --
> Sent from Gmail Mobile
>
>
>
> If you are lucky you’ll get a message along the lines of “scheduling while
> atomic” on your console to let you know you’ve blown it. At least that’s
> what I’ve seen when I’ve blown it like that. 8^)
>
>
>
> Jeff Haran
>
>
I did not see the message.  Actually my interrupt handler is calling
i2c_transfer which in turn used msleep() somewhere in its code.  Is this
normal or dangerous?



-- 
Sent from Gmail Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150820/d6efd1fe/attachment.html 


More information about the Kernelnewbies mailing list