Skip to contentSkip to conversation

Problem of thread creation with Xenomai Posix 2

Xenomai-help Fabien MAHOT 2 participants 5 messages Feb 18, 2008 – Feb 20, 2008 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
Quoted 1 line · Fabien MAHOT

Xenomai 2.3.4

When you reply a mail, please hit the "reply" button, so that the mail gets properly threaded by mail clients and by the mailing list archives.

Now, about your issue, I suspect what you observe is a consequence of pthread_create behaviour, could you try applying the patch I sent, or use Xenomai development trunk or v2.4.x branch ?

Signature · 1 line
 Gilles Chanteperdrix

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 12 lines · Fabien MAHOT
Quoted 12 lines
Quoted 1 line · Fabien MAHOT

Xenomai 2.3.4

When you reply a mail, please hit the "reply" button, so that the mail gets properly threaded by mail clients and by the mailing list archives.

Now, about your issue, I suspect what you observe is a consequence of pthread_create behaviour, could you try applying the patch I sent, or use Xenomai development trunk or v2.4.x branch ?

Quoted 8 lines
Quoted 3 lines

--
Gilles Chanteperdrix

Ok, I didn't want to use your patch because I would like to have a standard solution... I think I will try with Xenomai 2.4.x

Thank you for your answer

I should have said the "reply all" button instead of simply "reply" ;-)

I can reproduce the issue you have if I disable the "priority coupling" option in kernel configuration menu. With this option enabled, the scheduler works as you expect, even without the latest posix skin fixes.

For more information on priority coupling, read the help in kernel configuration menu.

Signature · 1 line
					    Gilles Chanteperdrix.
#4 lore raw
Quoted 4 lines

I can reproduce the issue you have if I disable the "priority coupling" option in kernel configuration menu. With this option enabled, the scheduler works as you expect, even without the latest posix skin fixes.

Quoted 8 lines

For more information on priority coupling, read the help in kernel configuration menu.

--

Gilles Chanteperdrix.

Thanks a lot, my program works correctly now. There is just the preemption problem during pthread_create. Nonce, I use mutex but I can't add it for all the parts of my application.

#5 lore raw
Quoted 10 lines · Fabien MAHOT
Quoted 10 lines

I can reproduce the issue you have if I disable the "priority coupling" option in kernel configuration menu. With this option enabled, the scheduler works as you expect, even without the latest posix skin fixes.

For more information on priority coupling, read the help in kernel configuration menu.

--

Quoted 6 lines
Quoted 2 lines

Gilles Chanteperdrix.

Thanks a lot, my program works correctly now. There is just the preemption problem during pthread_create. Nonce, I use mutex but I can't add it for all the parts of my application.

The preemption problem during pthread_create has been fixed in Xenomai trunk and v2.4.x branch, so the fix will be included in the next release of Xenomai. Note however that there is still a short window during which the newly created thread is not yet a real-time thread, and thus the priority coupling does not enter in action. But for this short window, there is nothing we can do.

Signature · 1 line
 Gilles Chanteperdrix