[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    Re: why cannot block inside interrupt context
From:       Rainer Weikusat <rainer.weikusat () sncag ! com>
Date:       2005-01-28 20:52:48
Message-ID: 87is5hi8db.fsf () farside ! sncag ! com
[Download RAW message or body]

Li Xinyi <lxinyi@gmail.com> writes:
> Chris McKillop wrote:
>>
>> The best thing you can do is read kernel/sched.c, starting with
>> schedule() so you can better understand how the linux kernel manages
>> process.  Basically the architecture of the kernel doesn't allow for
>> interrupt handlers to sleep.  A different kernel with a different
>> architecture could certainly provide such a feature.
>>     chris
>>
>
> That is eactly what I am asking, why cannot go back to interrupt
> handler after invoking sleep inside the handler,

Because you *cannot* sleep inside the handler. That would refer to
telling the kernel to schedule some other process instead of the
process on whose behalf your kernel code is running and there is no
such process. As soon as your handler is no longer running, it's
'context' is gone. There is no way for the kernel to come back after
'some time' has elapsed. And there is no point in asking why this is
so, because that's how the implementation works.

-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:       http://www.arm.linux.org.uk/armlinux/mlfaq.php
Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic