Re: [Xenomai-core] Re: RT-CAN tx_sem

2007-02-19 Thread Wolfgang Grandegger
Jan Kiszka wrote: Wolfgang Grandegger wrote: Jan Kiszka wrote: Wolfgang Grandegger wrote: Jan Kiszka wrote: Jan Kiszka wrote: I thought about this issue again and found the reason for my vague bad feeling: re-init is not atomic, thus racy. But also the test+sem_init pattern I suggested is no

Re: [Xenomai-core] Re: RT-CAN tx_sem

2007-02-19 Thread Jan Kiszka
Wolfgang Grandegger wrote: > Jan Kiszka wrote: >> Wolfgang Grandegger wrote: >>> Jan Kiszka wrote: Jan Kiszka wrote: > I thought about this issue again and found the reason for my vague bad > feeling: re-init is not atomic, thus racy. But also the test+sem_init > pattern I suggeste

Re: [Xenomai-core] Re: RT-CAN tx_sem

2007-02-19 Thread Wolfgang Grandegger
Jan Kiszka wrote: Wolfgang Grandegger wrote: Jan Kiszka wrote: Jan Kiszka wrote: I thought about this issue again and found the reason for my vague bad feeling: re-init is not atomic, thus racy. But also the test+sem_init pattern I suggested is not save. I guess we need to enhance rtdm_XXX_in

Re: [Xenomai-core] Re: RT-CAN tx_sem

2007-02-18 Thread Jan Kiszka
Wolfgang Grandegger wrote: > Jan Kiszka wrote: >> Jan Kiszka wrote: >>> I thought about this issue again and found the reason for my vague bad >>> feeling: re-init is not atomic, thus racy. But also the test+sem_init >>> pattern I suggested is not save. >>> >>> I guess we need to enhance rtdm_XXX_i

Re: [Xenomai-core] Re: RT-CAN tx_sem

2007-02-18 Thread Wolfgang Grandegger
Jan Kiszka wrote: Jan Kiszka wrote: I thought about this issue again and found the reason for my vague bad feeling: re-init is not atomic, thus racy. But also the test+sem_init pattern I suggested is not save. I guess we need to enhance rtdm_XXX_init in this regard to make the RT-CAN use case a

Re: [Xenomai-core] Re: RT-CAN tx_sem

2007-02-18 Thread Jan Kiszka
Jan Kiszka wrote: > I thought about this issue again and found the reason for my vague bad > feeling: re-init is not atomic, thus racy. But also the test+sem_init > pattern I suggested is not save. > > I guess we need to enhance rtdm_XXX_init in this regard to make the > RT-CAN use case an officia

[Xenomai-core] Re: RT-CAN tx_sem

2007-02-17 Thread Jan Kiszka
Wolfgang Grandegger wrote: > Jan Kiszka wrote: >> Wolfgang Grandegger wrote: >>> Jan Kiszka wrote: Wolfgang Grandegger wrote: > Hi Jan, > > Jan Kiszka wrote: >> Hi Wolfgang, >> >> fiddling with the CAN utils, I noticed the behaviour that >> rtcansend on >> fresh

[Xenomai-core] Re: RT-CAN tx_sem

2007-02-15 Thread Wolfgang Grandegger
Jan Kiszka wrote: Wolfgang Grandegger wrote: Jan Kiszka wrote: Wolfgang Grandegger wrote: Hi Jan, Jan Kiszka wrote: Hi Wolfgang, fiddling with the CAN utils, I noticed the behaviour that rtcansend on freshly registered but stopped devices simply blocks. And when you meanwhile call rtcanconf

[Xenomai-core] Re: RT-CAN tx_sem

2007-02-15 Thread Jan Kiszka
Wolfgang Grandegger wrote: > Jan Kiszka wrote: >> Wolfgang Grandegger wrote: >>> Hi Jan, >>> >>> Jan Kiszka wrote: Hi Wolfgang, fiddling with the CAN utils, I noticed the behaviour that rtcansend on freshly registered but stopped devices simply blocks. And when you meanwhil

Re: [Xenomai-core] Re: RT-CAN tx_sem

2007-02-15 Thread Sebastian Smolorz
Jan Kiszka wrote: > I don't think that the sem state > should be used for encoding the CAN device state towards potential senders. Why not? -- Sebastian ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core

[Xenomai-core] Re: RT-CAN tx_sem

2007-02-15 Thread Wolfgang Grandegger
Jan Kiszka wrote: Wolfgang Grandegger wrote: Hi Jan, Jan Kiszka wrote: Hi Wolfgang, fiddling with the CAN utils, I noticed the behaviour that rtcansend on freshly registered but stopped devices simply blocks. And when you meanwhile call rtcanconfig up on that device, rtcansend will continue t

[Xenomai-core] Re: RT-CAN tx_sem

2007-02-15 Thread Jan Kiszka
Wolfgang Grandegger wrote: > Hi Jan, > > Jan Kiszka wrote: >> Hi Wolfgang, >> >> fiddling with the CAN utils, I noticed the behaviour that rtcansend on >> freshly registered but stopped devices simply blocks. And when you >> meanwhile call rtcanconfig up on that device, rtcansend will continue to

[Xenomai-core] Re: RT-CAN tx_sem

2007-02-15 Thread Wolfgang Grandegger
Hi Jan, Jan Kiszka wrote: Hi Wolfgang, fiddling with the CAN utils, I noticed the behaviour that rtcansend on freshly registered but stopped devices simply blocks. And when you meanwhile call rtcanconfig up on that device, rtcansend will continue to block. I see the expected behavior on stopp

[Xenomai-core] Re: RT-CAN tx_sem

2007-02-15 Thread Wolfgang Grandegger
Jan Kiszka wrote: Hi Wolfgang, fiddling with the CAN utils, I noticed the behaviour that rtcansend on freshly registered but stopped devices simply blocks. And when you meanwhile call rtcanconfig up on that device, rtcansend will continue to block. This is a bug, the send function should retur