From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <52DCE706.6070100@xenomai.org> Date: Mon, 20 Jan 2014 10:06:14 +0100 From: Philippe Gerum MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] a test for rt_task_bin() List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: > _______________________________________________ > Xenomai mailing list > Xenomai@xenomai.org > http://www.xenomai.org/mailman/listinfo/xenomai > -- Philippe.