[FUSION-0.8.1]Bug with accessing RT_SEM from user space
Philippe Gerum
rpm at xenomai.org
Wed Aug 17 17:29:37 CEST 2005
Kern Alexander wrote:
> Hello,
>
> I observe a following behaviour on fusion-0.8.3 and fusion-0.8.1.
>
> Userspace application forks a RT thread, which reads some datas,
> syncronizing due a RT_SEM.
>
> rtthread_fct() {
> RT_SEM sem;
>
> rt_sem_bind(&sem);
0.8.3 and earlier releases have a nasty bug in the binding support code,
that may cause rt_sem_bind() to return a spurious handle. You may want
to give a try to the CVS version, just to verify this.
> rt_sem_p(&sem); //USE IT AS synchronize point, this will be
> permamently kicked from driver
> //do some work
> rt_sem_unbind(&sem);
>
> printf("YOU CAN SEE THIS LINE AS LAST, AFTER IT, APPLICATION STAYS\n")
> printf("YOU CAN SIGABORT IT, BUT LINUX WILL BE SLOWLY AND SLOWLY,
> AND WILL BE DIE!\n);
> rt_task_delete(NULL);
> }
>
> main() {
> rt_tsk_spawn(...rttherad_fct);
>
> while(!done) {
> printf("YOU CAN SEE THIS LINE!\n);
> sleep(1);
> printf("THIS CODELINE WILL BE NOT REACHED IF WE TOUCH RT_SEM, !\n);
> }
> }
>
> If I comment out lines with rt_sem_bind, rt_sem_p rt_sem_unbind, it
> works like a charm!
>
> Have anybody an idee, what is in my code wrong? Please help!
>
> Kind Regards
>
> Alexander Kern
--
Philippe.
More information about the Rtai
mailing list