2009/9/18 Leonidas . <leonidas137@xxxxxxxxx>: > > > On Fri, Sep 18, 2009 at 2:52 AM, Pei Lin <telent997@xxxxxxxxx> wrote: >> >> 2009/9/18 Michael Blizek <michi1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>: >> > Hi! >> > >> > On 14:45 Fri 18 Sep , Pei Lin wrote: >> > >> > ... >> > >> >> This problem is so weird i think. why u need do this check. And you >> >> design your functions and why not know >> >> the code run in which level ? linux is totally opensouce and >> >> transparent for programmers. >> > >> > He is programming a library which should be callable in both interrupt >> > and non >> > interrupt context. >> > >> ISR require short simple and do fast.... most time it only do some >> work as set/check hardware register or set some flags. >> i don't think the things above make more sense. >> what's your opinion, michi? >> >> >> > -Michi >> > -- >> > programing a layer 3+4 network protocol for mesh networks >> > see http://michaelblizek.twilightparadox.com >> > >> > >> >> >> >> -- >> Best Regards >> Lin > > > Lin, > >>ISR require short simple and do fast.... most time it only do some >>work as set/check hardware register or set some flags. > > This is what one reads in books or does in small drivers like keypad driver. > > The use case which I am talking about is a real life scenario. One might > need to > update a data structure from ISRs too. In my case it is a tree which might > make > it look more complex. But trust me, my intentions are good and my heart is > in > right place. Nothing bad is going to happen. So let me attempt it :-). > > I assume that I have convinced you now! yeah, i know u make a complex logic to handle. But in my opinion, if your ISR takes too long cpu ticks, how do u solve the problem about interrupt lost? So i think that's the reason why need ISR short. That is why the interrupt handle divides to top half and bottom half. why not make your ISR(top half) to perform like a trigger? when an interrupt happens, it trigger or wake up your bottom half to do your complex logic. i am concerned that why u want to put your complex design all into the interrupt context. If i was wrong,please correct me. thanks > > > -Leo. > -- Best Regards Lin -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ