Re: "upping" a semaphore from interrupt context?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Satyam Sharma
Date: Saturday, June 23, 2007 - 10:16 am

On 6/23/07, Robert P. J. Day <rpjday@mindspring.com> wrote:

Yes, they do have additional restrictions (mutex_trylock() illegal from
contexts that cannot sleep, mutexes may only be unlocked by tasks
that took them in the first place). But note that these are
_implementation_ sanity checks that were introduced to catch
nonsensical usage, which was possible (and not explicitly being
guarded against, because of the generic-ness that was needed to
be maintained for the counted case too) with the "semaphore"s.


I do mean precisely that. I really cannot think of any sensible / normal
usage case of binary semaphores that cannot be replaced with either
mutexes (if that's the kind of locking you actually want) or completion
handlers (if that's the kind of synchronization you actually want).

Satyam
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: &quot;upping&quot; a semaphore from interrupt context?, Arnd Bergmann, (Fri Jun 22, 10:34 am)
&quot;upping&quot; a semaphore from interrupt context?, Florin Iucha, (Fri Jun 22, 10:38 am)
Re: &quot;upping&quot; a semaphore from interrupt context?, Satyam Sharma, (Fri Jun 22, 10:50 am)
Re: &quot;upping&quot; a semaphore from interrupt context?, Robert P. J. Day, (Sat Jun 23, 4:52 am)
Re: &quot;upping&quot; a semaphore from interrupt context?, Robert P. J. Day, (Sat Jun 23, 5:06 am)
Re: &quot;upping&quot; a semaphore from interrupt context?, Robert P. J. Day, (Sat Jun 23, 9:11 am)
Re: &quot;upping&quot; a semaphore from interrupt context?, Satyam Sharma, (Sat Jun 23, 10:02 am)
Re: "upping" a semaphore from interrupt context?, Satyam Sharma, (Sat Jun 23, 10:16 am)
Re: &quot;upping&quot; a semaphore from interrupt context?, Robert P. J. Day, (Sun Jun 24, 8:25 am)
Re: &quot;upping&quot; a semaphore from interrupt context?, Robert P. J. Day, (Sun Jun 24, 9:59 am)
Re: &quot;upping&quot; a semaphore from interrupt context?, Satyam Sharma, (Sun Jun 24, 11:12 am)