MultiThread

Pierre Ficheux pierre.ficheux at openwide.fr
Sun Jul 29 21:44:07 UTC 2012


Le 29/07/12 20:32, m.shahverdi a écrit :
> Hi
> I have a problem with multithreading in RTEMS. my application consists
> of two threads that should be executed concurrently but when second
> thread is made it doesn't run! in all of RTEMS thread samples one of the
> threads should wait or sleep to run the other thread but in my apps two
> threads exactly should be executed concurrently.
> so what should I do?
> 

Did you increase the number of threads? something like:

#define CONFIGURE_MAXIMUM_POSIX_THREADS              3 // n threads + 1

You could display error message at thread creation ("No more processes" ?)

 if ((e = pthread_create (&th, NULL, thread_process, msg)) != 0) {
    fprintf (stderr, "pthread_create error => %s\n", strerror(e));
    exit (1);
 }

regards


-- 
Pierre FICHEUX -/- CTO OW/OWI, France -\- pierre.ficheux at openwide.fr
                                         http://ingenierie.openwide.fr
                                         http://www.ficheux.org
I would love to change the world, but they won't give me the source code






More information about the users mailing list