On Tue, Jan 4, 2011 at 10:03 PM, Pavel Machek <pavel@ucw.cz> wrote:
Though spin lock involved, the caller has to sleep 800ns per loop.
As I understand, the example, though could be totally removed, does
not show the recommended usage of nano semaphore, but expresses the
difference from semaphore. The recommended however looks
nano_semaphore_down(s, 0);
do_home_work();
nano_semaphore_up(s);
if you like to wait as long as possible.
Cheers
Hillf
--