Hello everyone,
I'm having a big problem. I have a program with several threads that call
each other with pthread_wakeup_np().
It looks kinda like this:
void *thread_1()
{
while (1){
pthread_suspend_np();
something;
pthread_wakeup_np(thread[1]);
}
}
void *thread_2()
{
while (1){
pthread_suspend_np();
something;
pthread_wakeup_np(thread[2]);
}
}
void *thread_3()
{
while (1){
pthread_suspend_np();
something;
pthread_wakeup_np(thread[0]);
}
}
This example is very simplified. The number of threads is around 10. The
problem is that the first iteration goes well and than it stalls. It comes
to the place where let's say thread_1 is woken up but it never executes.
I had the same basic setup with only 3 threads and it run for over 1000
iterations when I stopped. Through debugging the code with gdb I found it
is hanging in rtl_sched.o.
I found the comment the scheduler should only be used with <10 threads.
Could this be the cause of my problems?
Any comments or hints are very much appreciated.
Thanks for your help.
Ciao,
Philip
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/