Skip to contentSkip to conversation

Problems with rt_task_create and rt_task_join

Xenomai-help Mauro Salvini 2 participants 2 messages Feb 10, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 21381658.41297350790328.JavaMail.SYSTEM@pc-msalvini

#1 lore raw

Hello to all,
finally I found a bug into my code which is not related with join functions. Now all works fine. Thank you for support (and tolerate) me!

I have one just one last question (another!) to you:
I create a pthread with joinable attribute, and then I transform it in a realtime ask with rt_task_shadow().
When I join this task I must call pthread_join(), because rt_task_join() generates a segmentation fault (in the point where latter function internally calls pthread_join()). Is this behaviour correct?

Thanks again in advance, regards
Mauro

#2 lore raw
Quoted 11 lines · Mauro Salvini

Hello to all, finally I found a bug into my code which is not related with join functions. Now all works fine. Thank you for support (and tolerate) me!

I have one just one last question (another!) to you: I create a pthread with joinable attribute, and then I transform it in a realtime ask with rt_task_shadow().
When I join this task I must call
pthread_join(), because rt_task_join() generates a segmentation fault (in the point where latter function internally calls pthread_join()).
Is this behaviour correct?

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.

Signature · 1 line
					    Gilles.