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
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai



--
Philippe.

_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to