On Wed, 2007-05-09 at 09:07 +0200, Markus Osterried wrote:
> Hello Gerum,
> sorry for not knowing the details. But there is another question.
> Is it okay to move the pointer to the arguments to the newly created task?
> Isn't it possible that the task which created the new task is rescheduled?
> The old task could change the value of the argument and because the new
> task only holds a reference to this argument, the new task is also
Yes, such side-effect would be possible, not necessarily for the
creator, but for the thread calling t_start() though. The worst case
would happen when calling t_start() with args laid into the caller's
stack space, and the caller unwinding the current frame immediately
since it has a higher priority than the started thread.
This boils down to one question: does actually pSOS pass the argument
array by reference, or by value? In the latter case, the current
implementation would be wrong, otherwise, the side-effect would be
Xenomai-core mailing list