fa.netbsd.tech.kern
[Top] [All Lists]

Re: SEM_VALUE_MAX too big?

Subject: Re: SEM_VALUE_MAX too big?
From: Klaus Heinz <k.heinz@xxxxxxxxxxxxxxxx>
Date: Tue, 29 Jul 2008 20:11:25 UTC
Newsgroups: fa.netbsd.tech.kern

Quentin Garnier wrote:

> I don't think there is much use for a semaphore value in the range
> 2 billions to 4 billions.  I think we can go with lowering it and
> nobody will ever notice.

While looking for usage of SEM_VALUE_MAX I found out there are in fact
two identical definitions, one in the public header file
src/include/semaphore.h and the other in src/sys/kern/uipc_sem.c.

More than one place for the definition of a symbol seems undesirable to me.

I had a look at the FreeBSD sources and found they protect part of their
sys/semaphore.h with "#ifndef _KERNEL ...#endif" and include
it in kern/uipc_sem.c, thus sharing the definition of SEM_VALUE_MAX.


ciao
     Klaus

<Prev in Thread] Current Thread [Next in Thread>