This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in sem_getvalue


jyl087@netscape.net wrote:
> 
> In "sem.cxx" ...
> 
> I don't know what POSIX says about sem_getvalue, but at least my
> RH7.2 manpage on sem_getvalue says that:
> 
>   sem_getvalue should always return 0.
>   *sval = retval;

There is indeed a mistake in sem_getvalue, although the man page is also
strictly incorrect with respect to the standard (although it may be correct
with respect to the Linux implementation). According to my spec:

"If sem is locked, then the value returned by sem_getvalue() shall be
either zero or a negative number whose absolute value represents the number
of processes waiting for the semaphore at some unspecified time during the
call."

Anyway, I've fixed this for the future. Thanks for the report.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]