tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: SEM_VALUE_MAX too big?

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.


Home | Main Index | Thread Index | Old Index