From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 11 Feb 2011 09:10:49 +0100 (CET) From: Mauro Salvini Message-ID: <15658959.21297411846156.JavaMail.SYSTEM@pc-msalvini> In-Reply-To: <8701358.01297411757328.JavaMail.SYSTEM@pc-msalvini> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1_14608998.1297411846156" Subject: Re: [Xenomai-help] Problems with rt_task_create and rt_task_join List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: xenomai@xenomai.org ------=_Part_1_14608998.1297411846156 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit > Well, looking at the code, this should not happen. The question is: how > do you ensure, in the code that calls rt_task_join, that the thread > being created had the time to call rt_task_shadow? In other words, are > you sure that you are not passing rt_task_join an uninitialized RT_TASK? > So, as usual, we are missing a simple standalone test showing the issue > you have. There was a subtle bug that realizes exactly what you explained, thank you! Question is: after a successful rt_task_shadow() call done by a pthread, we can forget that this rt-task was created as pthread and then we must handle it with rt_task_* procedures, is it right? In other words, does pthread become a RT_TASK at all, as if it was created with rt_task_create()? Thanks again, Gilles. ------=_Part_1_14608998.1297411846156 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: Times New Roman; font-size: 12pt; color: #000000'= >> Well, looking at the code, this should not happen. The question is: h= ow
> do you ensure, in the code that calls rt_task_join, that the thr= ead
> being created had the time to call rt_task_shadow? In other wor= ds, are
> you sure that you are not passing rt_task_join an uninitial= ized RT_TASK?

> So, as usual, we are missing a simple standalone = test showing the issue
> you have.

There was a subtle bug that= realizes exactly what you explained, thank you!
Question is: after a su= ccessful rt_task_shadow() call done by a pthread, we can forget that this r= t-task
was created as pthread and then we must handle it with rt_task_* = procedures, is it right?
In other words, does pthread become a RT_TASK a= t all, as if it was created with rt_task_create()?

Thanks again, Gil= les.
------=_Part_1_14608998.1297411846156--