This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Queries concerning RTOS protection in newllib


On Jun 17 14:07, Jeff Johnston wrote:
> Corinna Vinschen wrote:
> >As I said, reverting _GLOBAL_REENT to _impure_ptr restores the correct
> >behaviour again.  I still don't quite understand the invention of
> >_global_impure_ptr.  _GLOBAL_REENT is used a lot in newlib and due to
> >it's redefinition to another global variable, all this functionality
> >is potentially accessing the wrong datastructure.  If you actually
> >need a never changing _global_impure_ptr, then that's ok, but it shouldn't
> >be used by default from all these functions and therefore not be defined
> >as _GLOBAL_REENT, should it?
> 
> Actually, it shouldn't change based on its reason for being.  It is meant 
> to be global across threads.  It stores the full file chain for "all" 
> threads (excepting thread std streams for the moment) and it also has the 
> full atexit list.
> 
> While I have no problem in backing off the change for the moment to keep 
> Cygwin up and running, I would like to see further investigation as to why 
> Cygwin depends on _GLOBAL_REENT changing in tandem with _REENT 
> (_impure_ptr).  It might indicate a missing usage of _GLOBAL_REENT in 
> newlib or a logic flaw in Cygwin.

Thanks for backing this out for now.  Unfortunately I can't tell for sure
so far what the exact problem is.  I tried several changes already but
to no avail.  Unfortunately I don't have experience with the impure_ptr
stuff so I'm a bit shooting in the dark here.  I'll send a heads up to
cygwin-developers list.


Corinna

-- 
Corinna Vinschen
Cygwin Co-Project Leader
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]