RSB and C++ Model
joel.sherrill at OARcorp.com
Tue Mar 25 06:16:04 UTC 2014
On 3/24/2014 11:29 PM, Chris Johns wrote:
> On 25/03/2014 4:41 am, Joel Sherrill wrote:
>> On 3/24/2014 12:36 PM, Sebastian Huber wrote:
>>> On 03/24/2014 06:14 PM, Joel Sherrill wrote:
>>>> My most recently built toolset seems to be using pthreads instead
>>>> of the RTEMS thread code. Any ideas?
>>> Its due to this patch:
>>> We should really avoid using the POSIX GCC thread model. Its too
>>> dangerous due to the silent errors.
> Yes this is true but it did not fail in the way the RTEMS wrapper did
> with SMP. I felt it was the lesser of 2 bad situations.
> I also suspect the issue with gcc and the POSIX thread support is still
> open and will need to be addressed. As far as I understand the mingw64
> tools uses POSIX rather than the win32 thread model with an add on
> pthread library.
We need to propose a target specific macro to gcc to do something based on
the status code. Something like a G++ run-time specific assert that the
can tailor. We really want to know about failures, I am not so sure that
It will be hard for a user to debug random C++ run-time failures from
FWIW having run into this problem porting things, there is a debug
printk at the
bottom of _Objects_Allocate() to report just this situation. Any
allocation of anything
with an ID fails at this single point. It is a handy debug thing but
there may be a way
to generalize this.
>> I knew the patch and the problem. I was surprised it was included and
>> wanted to confirm that we agreed it shouldn't be.
>> Should I put together a patch for the RSB?
> If we keep using the wrapper that is fine and I will review a patch once
> the gxx wrapper changes to fix it have been completed and merged into
> master. Sebastian, how is the gxx_wrapper code tested ?
> Long term I feel the posix thread model maybe a better path because it
> means we need just one supported interface with gcc. The c++11 threading
> support will also require pthreads.
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