[ECOS] No binary semaphore in C API?
Mon Mar 26 03:53:00 GMT 2001
Jonathan Larmour <firstname.lastname@example.org> writes:
> Grant Edwards wrote:
> > So, I wanted to use binary semaphores, but can't find the API.
> > The program is using counting semaphores right now, but using a
> > binary ones would be a bit more "defensive".
> > Is there a technical reason that there isn't a C API for binary
> > semaphores, or is it something that just hasn't been done yet?
> Certainly no technical reason. Nick may not have done it out of principle.
> But right now he's on vacation, so it's best to wait till he returns.
It was never intended that the KAPI be a complete reflection of the
kernel implementation. It is meant to be a consistent, self-contained,
small API that can be used by C applications. Like the uITRON and
POSIX APIs it only exposes a subset. It was considered unnecessary to
export binary semaphores, since a counting semaphore initialized to 1
is functionally equivalent.
If I had had my way the KAPI would have been even more minimal that it
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK
More information about the Ecos-discuss