On Tue, 2011-10-04 at 11:42 +0200, Thomas De Schampheleire wrote:
> Hi,
> 
> In the xenomai-forge psos library, t_start() does not allow a NULL
> args pointer, while I think this is allowed in PSOS.

Yes, I think so as well. Good catch.

> The below code changes fix the problem.
> (Note that I realize this mail is not formatted as a proper patch; if
> you prefer patches for these small changes, let me know).

I can deal with the patch below. However, git-generated patches are
preferred.

> 
> Best regards,
> Thomas
> 
> diff --git a/lib/psos/task.c b/lib/psos/task.c
> --- a/lib/psos/task.c
> +++ b/lib/psos/task.c
> @@ -335,10 +335,17 @@ u_long t_start(u_long tid,
>                 return ret;
> 
>         task->args.entry = entry;
> -       task->args.arg0 = args[0];
> -       task->args.arg1 = args[1];
> -       task->args.arg2 = args[2];
> -       task->args.arg3 = args[3];
> +       if (args) {
> +               task->args.arg0 = args[0];
> +               task->args.arg1 = args[1];
> +               task->args.arg2 = args[2];
> +               task->args.arg3 = args[3];
> +       } else {
> +               task->args.arg0 = 0;
> +               task->args.arg1 = 0;
> +               task->args.arg2 = 0;
> +               task->args.arg3 = 0;
> +       }
>         task->mode = mode;
>         threadobj_start(&task->thobj);
>         put_psos_task(task);
> 
> _______________________________________________
> Xenomai-help mailing list
> [email protected]
> https://mail.gna.org/listinfo/xenomai-help

-- 
Philippe.



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

Reply via email to