From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4B758DC6.4040508@domain.hid> Date: Fri, 12 Feb 2010 18:20:06 +0100 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <20100204105700.GB20669@domain.hid> <4B6C1E66.2000008@domain.hid> <4B6C2D59.9060200@domain.hid> <4B7019AA.8020102@domain.hid> <4B71339F.6050300@domain.hid> <4B713462.6000300@domain.hid> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-help] Force switch back to primary domain List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Henri Roosen Cc: Jan Kiszka , "xenomai@xenomai.org" Henri Roosen wrote: > Ok, found some time to investigate the mutex problem we see on 2.5.1. > > I managed to reproduce with a basic app that uses the same way of > thread creation as we have in our app. > Please find attached the basic app. Note, it runs fine on Xenomai > 2.4.10. Fails on 2.5.1. > > Also, the problem does not show when creating the threads with rt_task_create. > > So the main question is, should it be possible to create threads with > the clone() system call and then shadowing the threads into the > Xenomai domain with rt_task_shadow()? And are we just lucky it runs > this way in 2.4.10? To get __thread working, I think you should pass CLONE_SETTLS to clone, with something as the tls argument. But what to pass probably depends on the internals of the glibc. I would also pass CLONE_THREAD, since you want to create a thread in the same thread groups as other threads. -- Gilles.