Hi 

Thanks a lot. This patch does indeed fix my problem.

Best regards

Niklaus
Am Montag 22 September 2008 16.49:01 schrieb Philippe Gerum:
> Niklaus Giger wrote:
> > Hi
> >
> > Examining errors in my big testsuite I discovered that giving a second
> > time a binary semaphore xenomai returns an error where vxWorks reports
> > OK.
>
> Thanks for reporting. That patch should fix this issue:
>
> diff --git a/vxworks/semLib.c b/vxworks/semLib.c
> index 62f9326..6467354 100644
> --- a/vxworks/semLib.c
> +++ b/vxworks/semLib.c
> @@ -104,8 +104,11 @@ static STATUS xsem_give(struct wind_sem *sem)
>       if (syncobj_lock(&sem->u.xsem.sobj, &syns))
>               return S_objLib_OBJ_ID_ERROR;
>
> -     if (sem->u.xsem.value >= sem->u.xsem.maxvalue)
> -             ret = S_semLib_INVALID_OPERATION;
> +     if (sem->u.xsem.value >= sem->u.xsem.maxvalue) {
> +             if (sem->u.xsem.maxvalue == INT_MAX)
> +                     /* No wrap around. */
> +                     ret = S_semLib_INVALID_OPERATION;
> +     }
>       else if (++sem->u.xsem.value <= 0)
>               syncobj_post(&sem->u.xsem.sobj);
>
> > See the attached test case.
> >
> >> sudo  ../../bin/BSys/mak/xeno_vx-solo/debug/tst
> >> assert passed at testTask line 65
> >> assert passed at testTask line 66
> >> assert failed at testTask line 67
> >> testTask done
> >> Xenomai/SOLO: failed to remove registry mount point /mnt/xenomai/4569
> >> (errno=16)
> >
> > Best regards
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Xenomai-core mailing list
> > Xenomai-core@gna.org
> > https://mail.gna.org/listinfo/xenomai-core

-- 
NIklaus Giger


_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to