please do add kernelnewbies incc list, this conversation might help someone in future. On 5/10/06, Christian Boon <c.boon@xxxxxxxxxxxxxxxxxxxx> wrote:
Gaurav Dhiman wrote: > On 5/10/06, Christian Boon <c.boon@xxxxxxxxxxxxxxxxxxxx> wrote: > >> Hello, >> >> i've got a question. >> i have a module with an interrupt line connected to a fifo > > > what does this mean, please explain more. It means when receiving an interrupt a fifo is filled with data and it takes some time until the fifo is full. when i start reading the fifo right away, i would read the fifo faster then the fifo is filled so there has to be a delay of around 400 uS..
See processes waiting on your FIFO will be sleeping as you FIFO is emply, now when interrupt occurs and fills up the FIFO, once the FIFO is filled up, it should wake up the sleeping processes on that FIFO and once those will be waked up only then the process will try to read the FIFO, so there is no problem of readin the FIFO afst than filling it up. when the FIFO is empty put the process on sleep on some waiting queue and once the interrupt handlers fills the FIFO then only wake up the sleeping processes from interrupt context. In case I did not understand your problem fully, correct me.
> >> is it possible to wait after an interrupt for 400 uS before execution a >> function (reading the fifo)? > > > why you want to wait in interrupt handler, not a good idea atall. I dont want to wait in an interrupt handler, i just want to delay reading the fifo because otherwise the fifo won't be filled yet. I know there are bottom halves to delay execution of a specific function, but those are always in the range of jiffies, not micro seconds. Christian.
-- Gaurav Email: gauravd.chd@xxxxxxxxx -------------------------------------------- Read my Linux Kernel blog at: http://lkdp.blogspot.com/ -------------------------------------------- -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/