This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
sem_getvalue
- To: <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] sem_getvalue
- From: "Boris V. Guzhov" <borg at int dot spb dot ru>
- Date: Mon, 16 Apr 2001 17:24:57 +0400
Hi,
I use shapshot April 5 2001.
In packages/compat/posix/current/src/sem.cxx file
there is function:
externC int sem_getvalue (sem_t *sem, int *sval)
{
int retval;
SEMA_ENTRY();
Cyg_Counting_Semaphore *sema = (Cyg_Counting_Semaphore *)sem;
retval = sema->peek();
CYG_REPORT_RETVAL( retval );
return retval;
}
I think that it wrong.
And the following is correct:
externC int sem_getvalue (sem_t *sem, int *sval)
{
int retval;
SEMA_ENTRY();
Cyg_Counting_Semaphore *sema = (Cyg_Counting_Semaphore *)sem;
*sval = sema->peek();
CYG_REPORT_RETVAL( retval );
return 0;
}
That's right?
--
Boris Guzhov,
St.Petersburg, Russia