Re: Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Robert Hancock
Leon Woestenberg wrote: Hello, I'm converting an out-of-tree (*1) driver from binary semaphore to mutex. Userspace updates a look-up-table using write(). The driver tries to write this LUT to the FPGA in the (video frame) interrupt handler. It is important that the LUT is consistent and thus

Re: Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Arjan van de Ven
On Thu, 22 Nov 2007 17:02:44 +0100 "Leon Woestenberg" <[EMAIL PROTECTED]> wrote: > Hello, > > > I'm converting an out-of-tree (*1) driver from binary semaphore to > mutex. > > Userspace updates a look-up-table using write(). The driver tries to > write this LUT to the FPGA in the (video frame)

Re: Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Michal Schmidt
On Thu, 22 Nov 2007 17:19:44 +0100 "Leon Woestenberg" <[EMAIL PROTECTED]> wrote: > I forgot to mention that I would like to be prepared for, and use the > -rt patch soon. I understand (maybe wrongly?) that semaphores are not > real-time pre-emptible, mutexes and spinlocks are. Semaphores are

Re: Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Leon Woestenberg
Hello, On Nov 22, 2007 5:11 PM, Oliver Neukum <[EMAIL PROTECTED]> wrote: > Am Donnerstag 22 November 2007 schrieb Leon Woestenberg: > > I would like to know why this is not so, and if someone has a cleaner > > proposal than the "try spinlock" approach? > > Keep the semaphore. > I forgot to

Re: Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Oliver Neukum
Am Donnerstag 22 November 2007 schrieb Leon Woestenberg: > I would like to know why this is not so, and if someone has a cleaner > proposal than the "try spinlock" approach? Keep the semaphore. Regards Oliver - To unsubscribe from this list: send the line "unsubscribe

Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Leon Woestenberg
Hello, I'm converting an out-of-tree (*1) driver from binary semaphore to mutex. Userspace updates a look-up-table using write(). The driver tries to write this LUT to the FPGA in the (video frame) interrupt handler. It is important that the LUT is consistent and thus changed atomically. Note

Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Leon Woestenberg
Hello, I'm converting an out-of-tree (*1) driver from binary semaphore to mutex. Userspace updates a look-up-table using write(). The driver tries to write this LUT to the FPGA in the (video frame) interrupt handler. It is important that the LUT is consistent and thus changed atomically. Note

Re: Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Leon Woestenberg
Hello, On Nov 22, 2007 5:11 PM, Oliver Neukum [EMAIL PROTECTED] wrote: Am Donnerstag 22 November 2007 schrieb Leon Woestenberg: I would like to know why this is not so, and if someone has a cleaner proposal than the try spinlock approach? Keep the semaphore. I forgot to mention that I

Re: Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Oliver Neukum
Am Donnerstag 22 November 2007 schrieb Leon Woestenberg: I would like to know why this is not so, and if someone has a cleaner proposal than the try spinlock approach? Keep the semaphore. Regards Oliver - To unsubscribe from this list: send the line unsubscribe

Re: Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Michal Schmidt
On Thu, 22 Nov 2007 17:19:44 +0100 Leon Woestenberg [EMAIL PROTECTED] wrote: I forgot to mention that I would like to be prepared for, and use the -rt patch soon. I understand (maybe wrongly?) that semaphores are not real-time pre-emptible, mutexes and spinlocks are. Semaphores are

Re: Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Arjan van de Ven
On Thu, 22 Nov 2007 17:02:44 +0100 Leon Woestenberg [EMAIL PROTECTED] wrote: Hello, I'm converting an out-of-tree (*1) driver from binary semaphore to mutex. Userspace updates a look-up-table using write(). The driver tries to write this LUT to the FPGA in the (video frame) interrupt

Re: Use of mutex in interrupt context flawed/impossible, need advice.

2007-11-22 Thread Robert Hancock
Leon Woestenberg wrote: Hello, I'm converting an out-of-tree (*1) driver from binary semaphore to mutex. Userspace updates a look-up-table using write(). The driver tries to write this LUT to the FPGA in the (video frame) interrupt handler. It is important that the LUT is consistent and thus