[ECOS] sem_getvalue
Boris V. Guzhov
borg@int.spb.ru
Mon Apr 16 06:41:00 GMT 2001
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
More information about the Ecos-discuss
mailing list