Benjamin Walsh <benjamin.walsh@...>
On Fri, Aug 26, 2016 at 12:10:40PM +0100, Jon Medhurst (Tixy) wrote:
HiSpinlocks don't give you anything more than interrupt or scheduler
locking in a uniprocessor system with a scheduler like Zephyr's, since
you need to lock interrupts and/or scheduling as well when you're holing
them or there is a good chance you'll deadlock. You probably want just
interrupt or scheduler locking instead. Scheduler locking is coming up
in the upcoming unified kernel, but is not available at the moment;
interrupt locking is of course available.
A mutex is indeed too heavy for this, and they're currently not usable
by fibers (upcoming change in the unified kernel as well). A nanokernel
semaphore might be a good fit. Or interrupt locking.
However, looking at the GPIO API's and various implementations I can't