Sleep in rtdm driver
Hi,
Quoted 13 lines · 在2010-03-18 00:19:47,"Philippe Gerum" <[email protected]> 写道:
Quoted 11 lines · On Wed, 2010-03-17 at 22:07 +0800, robert165 wrote:
Hi everyone!
I'm writing a gpio driver in RTDM. I start it with the demo "Hard real time RTDM driver skeleton v1.1" of Jan Kiszka.
If I usedrtdm_task_sleepinrt_ioctrlfunction, it return that "Xenomai: assertion failed atkernel/xenomai/skins/rtdm/drvlib.c:372(!xnpod_unblockable_p())" when running.
It is said thatrtdm_task_sleepcan be called from Kernel-based task. Why I can't use it in my driver. Optionally, I can do this in user-space by periodic calling the driver, but it seems slower than in kernel space.
Quoted 1 line
I'm puzzled: what does "slower" mean, regarding what operation?
I am sorry, I means is it more effective if doing things in kernel space. I think when periodic calling driver in user-space, it may spent more in context switching. Thanks a lot.
Quoted 17 lines · robert165 wrote:
Hi,
Quoted 12 lines · 在2010-03-18 00:19:47,"Philippe Gerum" <[email protected]> 写道:
Quoted 11 lines · On Wed, 2010-03-17 at 22:07 +0800, robert165 wrote:
Hi everyone!
I'm writing a gpio driver in RTDM. I start it with the demo "Hard real time RTDM driver skeleton v1.1" of Jan Kiszka.
If I usedrtdm_task_sleepinrt_ioctrlfunction, it return that "Xenomai: assertion failed atkernel/xenomai/skins/rtdm/drvlib.c:372(!xnpod_unblockable_p())" when running.
It is said thatrtdm_task_sleepcan be called from Kernel-based task. Why I can't use it in my driver. Optionally, I can do this in user-space by periodic calling the driver, but it seems slower than in kernel space.
Quoted 2 lines
Quoted 1 line
I'm puzzled: what does "slower" mean, regarding what operation?
I am sorry, I means is it more effective if doing things in kernel space. I think when periodic calling driver in user-space, it may spent more in context switching.
If you really depend on this minor difference, you are already designing with a too small safety margin.
Have you measured the differences and compared them to your requirements?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 18 lines · 在2010-03-18 23:18:55,"Jan Kiszka" <[email protected]> 写道:
Quoted 17 lines · robert165 wrote:
Hi,
Quoted 12 lines · 在2010-03-18 00:19:47,"Philippe Gerum" <[email protected]> 写道:
Quoted 11 lines · On Wed, 2010-03-17 at 22:07 +0800, robert165 wrote:
Hi everyone!
I'm writing a gpio driver in RTDM. I start it with the demo "Hard real time RTDM driver skeleton v1.1" of Jan Kiszka.
If I usedrtdm_task_sleepinrt_ioctrlfunction, it return that "Xenomai: assertion failed atkernel/xenomai/skins/rtdm/drvlib.c:372(!xnpod_unblockable_p())" when running.
It is said thatrtdm_task_sleepcan be called from Kernel-based task. Why I can't use it in my driver. Optionally, I can do this in user-space by periodic calling the driver, but it seems slower than in kernel space.
Quoted 7 lines
Quoted 2 lines
Quoted 1 line
I'm puzzled: what does "slower" mean, regarding what operation?
I am sorry, I means is it more effective if doing things in kernel space. I think when periodic calling driver in user-space, it may spent more in context switching.
If you really depend on this minor difference, you are already designing with a too small safety margin.
Have you measured the differences and compared them to your requirements?
No, the difference is not so important. I just want to kown the the reason why I got the error message that you have explained to me clearly. Thanks for help!