Re: [Semaphore API] down_interruptible_timeout

2015-06-16 Thread Mason
On 15/06/2015 18:56, Thomas Gleixner wrote: > On Mon, 15 Jun 2015, Mason wrote: > >> A) process-context kernel thread fills a FIFO and calls down(&fifo_empty); >> B) ISR handles the FIFO-empty interrupt with up(&fifo_empty); >> >> However, in case something goes wrong and the interrupt never fire

Re: [Semaphore API] down_interruptible_timeout

2015-06-15 Thread Thomas Gleixner
On Mon, 15 Jun 2015, Mason wrote: > A) process-context kernel thread fills a FIFO and calls down(&fifo_empty); > B) ISR handles the FIFO-empty interrupt with up(&fifo_empty); > > However, in case something goes wrong and the interrupt never fires, > I don't want the process to be stuck in an unint

[Semaphore API] down_interruptible_timeout

2015-06-15 Thread Mason
Hello, The semaphore API provides several flavors of the down primitive: down, down_interruptible, down_killable, down_trylock, down_timeout As far as I can tell, they all call __down_common (except down_trylock, which returns 1 where the others would sleep). I was looking for a version 1) wi