[En-Nut-Discussion] Mutex Implementation anybody?

Harald Kipp harald.kipp at egnite.de
Thu Apr 15 21:09:45 CEST 2004


>
>sorry for sending that much emails, but:

Me three. :-)


>does anybody uses something like a mutex?

Nut/OS is doing so. Too lazy to check where.
It's a simple mutual exclusion semaphore only.

Init: NutEventPost
Lock: NutEventWait
Release: NutEventPost
Destroy: Not required, because a queue needs almost no space.

It works, because Nut/OS sets the queue to SIGNALED,
if an event is posted to an empty queue.

If someone wants to have something more versatile,
I'm open to this idea. I'd only ask for, to limit the
usage of such more versatile functions in the kernel
code. Please do not replace existing code just because
it looks fancy. The less functions the kernel requires,
the easier it can be ported. More generally speaking,
not really replying to Matthias.

Harald




More information about the En-Nut-Discussion mailing list