All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] a test for rt_task_bin()
@ 2014-01-20  7:38 ali hagigat
  2014-01-20  9:06 ` Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: ali hagigat @ 2014-01-20  7:38 UTC (permalink / raw)
  To: xenomai

xenomai-2.6.3
linux-3.5.7

The output seems incorrect
-------------- 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xenomai] a test for rt_task_bin()
  2014-01-20  7:38 [Xenomai] a test for rt_task_bin() ali hagigat
@ 2014-01-20  9:06 ` Philippe Gerum
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2014-01-20  9:06 UTC (permalink / raw)
  To: ali hagigat, xenomai

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-20  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-20  7:38 [Xenomai] a test for rt_task_bin() ali hagigat
2014-01-20  9:06 ` Philippe Gerum

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.