Change RTEMS GCC Thread model to POSIX.

Joel Sherrill joel.sherrill at OARcorp.com
Mon Aug 12 17:33:40 UTC 2013


On 8/12/2013 8:41 AM, Gedare Bloom wrote:
> Is anything lost by going to POSIX threads in GCC?
Maintaining our own specific glue? :)

Seriously, this will just mean you have to have POSIX enabled
to have C++ run-time supported. This is the same as Ada now
and some TCP/IP servers.

Can this pthread view be applied to Objective-C? When I looked
at it, I started down the path of using pthreads. Unfortunately, the
code at that time had some non-portable stuff I ended up with
RTEMS versions of that were "simple portable POSIX"

More on a broader matter below.

> On Fri, Aug 9, 2013 at 3:06 AM, Chris Johns <chrisj at rtems.org> wrote:
>> Hi,
>>
>> The patch attached changes the RTEMS thread model in GCC from 'rtems' to
>> 'posix'. The patch also fixes the include paths for newlib so the correct
>> 'machine/_types.h' is picked up.
>>
>> RTEMS using the POSIX thread model in gcc means C++ works with SMP. The
>> 'rtems' thread model uses an RTEMS specific interface to code in RTEMS that
>> uses task variables. Task variables make no sense and will never work in SMP
>> systems [1].
>>
>> This patch leaves the RTEMS thread model in the gcc sources. A patch for gcc
>> patches list would need to remove these sources.
>>
>> Chris
>>
>> [1] We should consider no building the task variable code when building an
>> SMP kernel.
The issues with disable preemption, task variables, disabling ISRs,
etc when moving to SMP is going to be an issue for applications,
add-on libraries, and language run-times.  Off the top of my head,
I recall these are likely going to need work due to per task variables:

+ EPICS
+ Ada run-time (Special Self in Thread Dispatch)
+ Go?

We need to develop a collection of guidance. This is going to be
a bumpy evolution for many code bases.
>> _______________________________________________
>> rtems-devel mailing list
>> rtems-devel at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-devel
>>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel


-- 
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 devel mailing list