Subject: Re: semaphore
To: Simon J. Gerraty <sjg@crufty.net>
From: Darren Reed <darrenr@reed.wattle.id.au>
List: tech-kern
Date: 03/23/2002 12:00:18
In some email I received from Simon J. Gerraty, sie wrote:
> > How about adding:
> >
> > #define sema_v(x) sema_signal(x)
> > #define sema_p(x) sema_spinwait(x)
> > #define sema_p_wait(x) sema_wait(x)
> >
> > just to make it easier...
>
> Would that make it easier or just cause confusion?
So long as you have sema_v(), sema_p() and sema_p_wait() as being
able to be found with "man -k semaphore", I think not. Texts which
talk about semaphores and sample code will generally have a p() and
a v(). When you're writing code, looking at other examples which
use p() and v(), it is incredibly helpful to not have to think
which ones are right for here.
Darren