All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: ali hagigat <hagigatali@gmail.com>, xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] a test for rt_task_bin()
Date: Mon, 20 Jan 2014 10:06:14 +0100	[thread overview]
Message-ID: <52DCE706.6070100@xenomai.org> (raw)
In-Reply-To: <CAKKWdtc=J2y-ycDASTjSJesA1S+nfJYRt2zyKj9Spzh1m=H_Fg@mail.gmail.com>

On 01/20/2014 08:38 AM, ali hagigat wrote:
> xenomai-2.6.3
> linux-3.5.7
>
> The output seems incorrect

Your code is incorrect. You should pass the routine a pointer to valid 
memory where it can write the task handle back, not any random 
uninitialized pointer.

void task2_body(void *cookie){
- RT_TASK *newtask1;
+ RT_TASK newtask1;
RT_TASK_INFO info1;
int i;

- i = rt_task_bind(newtask1,"xtask1", TM_INFINITE);
+ i = rt_task_bind(&newtask1,"xtask1", TM_INFINITE);

> -------------- next part --------------
> ./examp9
> rt_task_bind() return value = -14
> ret val = -EFAULT
> task name is = xtask2
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: examp9.c
> Type: text/x-csrc
> Size: 1159 bytes
> Desc: not available
> URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20140120/28381566/attachment.c>
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
>


-- 
Philippe.


      reply	other threads:[~2014-01-20  9:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-20  7:38 [Xenomai] a test for rt_task_bin() ali hagigat
2014-01-20  9:06 ` Philippe Gerum [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52DCE706.6070100@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=hagigatali@gmail.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.