POSIX threads won't execute concurrently?
Joel Sherrill
joel.sherrill at oarcorp.com
Wed Aug 27 18:00:46 UTC 2014
It all depends on how you created them, scheduler attributes, priority,
RTEMS
configuration, etc.
Can you post the code?
--joel
On 8/27/2014 12:58 PM, Martin Galvan wrote:
> Hi everyone! I'm trying to run a simple program to test how RTEMS
> handles concurrency when using POSIX threads. My code is fairly
> simple: it creates two pthreads with each one printing its name in a
> loop. Normally I'd get something like:
>
> Thread 1
> Thread 1
> Thread 2
> Thread 2
> Thread 1
> Thread 1
> Thread 2
> ...
>
> and so on. However, when I try this on RTEMS the second thread will
> begin execution only after the first one ends, thus resulting in
> something like:
>
> Thread 1
> Thread 1
> Thread 1
> ...
> End of Thread 1.
> Thread 2
> Thread 2
> Thread 2
> ...
> End of Thread 2.
>
> I'm using the following configuration:
>
> #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
> #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> #define CONFIGURE_MICROSECONDS_PER_TICK 1000 /* 1 millisecond */
> #define CONFIGURE_TICKS_PER_TIMESLICE 20 /* 20 milliseconds */
> #define CONFIGURE_MAXIMUM_POSIX_THREADS 4
> #define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
> #define CONFIGURE_POSIX_INIT_THREAD_TABLE
> #define CONFIGURE_INIT
>
> #include <rtems/confdefs.h>
>
> Am I doing something wrong here?
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list