From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4EE714F2.4010600@domain.hid> Date: Tue, 13 Dec 2011 10:03:46 +0100 From: Gilles Chanteperdrix MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-help] When startup the preemptive priority-base scheduling, at the start pont, I observed the output with wrong order. List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lifeng Wang Cc: xenomai@xenomai.org On 12/13/2011 03:48 AM, Lifeng Wang wrote: > Why is it not? > Can someone tell me why and tell me how to write the correct code for the > preemptive priority-base scheduling. rt_printf does not preserve the order of prints between tasks. Besides with rt_print_auto_init, the first rt_printf may cause a call to malloc, which may cause a switch to secondary mode. So you should not rely on what the test prints. -- Gilles.