----- 原始邮件 -----
发件人:Philippe Gerum <[email protected]>
收件人:[email protected]
主题:Re: 回复:Re:_回复:Re: [Xenomai-help]How to add"t_restart" to pSoS emulator
日期:2010-9-23 20:33:57

On Thu, 2010-09-23 at 17:52 +0800, [email protected] wrote:
>> Thank you Philippe very much. I am working on porting our pSoS code to
>> xenomai. There are many syscall "t_restart" in our code. The case is
>> not like what you mentioned. Let me give a example to illustrate our
>> case:
>> 
> >Task A create and start Task B with parameter "X", then Task B run and
>> suspend when its parameter is "X". At rigth time, Task A restart Task
>> B with parameter "Y", the Task will re-run with a new parameter "Y"
>> and won't suspend.

> I still don't see the requirement for t_restart() in your description.
> Task A doing t_delete(task B), then t_create(task B) + t_start(task B,
> param=X or Y) would behave exactly the same way AFAICS. Again, the only
> feature that t_restart() buys you is forcibly unblocking a task from a
> pending state, at the expense of branching back to its entry point. Task
> B does not seem to pend on anything, it is merely suspended, and only
> waits for task A for resetting it. I see no difference with
> self-deletion followed by a respawn.

Yes, it seems the better way is deleting task B and then creating and starting 
it. The only side effect is that the task&nbsp;ID of task B will 
be&nbsp;changed to a new one. &nbsp;But&nbsp;that shuld not be a problem.
>>
>> 
>> 
>> I just don't want to modify the code and want to implement the syscall
>> "restart" to make the porting smoothly. 
>> 
>> 

> t_restart() has non-trivial semantics for user-space threads. Trying to
> emulate it may cost more than getting rid of it, unless you are ready to
> invest some time to make your way through Xenomai's innards. YMMV.
&nbsp;
I am very interested in xenomai and I hope I&nbsp;can have more time to 
research it deeply. Thanks.
&nbsp;
>> 
>> 
>> Best regards
>> 
>> Wenyi Gao 
>> 
>> 

> -- 
>Philippe.


_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to