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.

> 
>  
> 
> 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.

>  
> 
> Best regards
> 
> Wenyi Gao 
> 
> 

-- 
Philippe.



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

Reply via email to