This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


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

Re: oldhand cygwinner needed: RE: __errno_location() like functionality in Cygwin


"egor duda" <deo@logos-m.ru> wrote:

> >> As for errno in cygwin I'm not sure off the top of my head as to it's
> >> thread safeness... comments anyone?
> 
> DT> That is the core of my question.
> 
> use the source, Luke :) it is.

Thanks for the pointer, but did you see my original question? How can I have
*only* thread local errno variable? Under Linux that functionality is provided
by overriding __errno_location() function. Under Cygwin definition of my own
__errno() function doesn't help.

And regarding the pointed out code:

int *
__errno ()
{
  return &_REENT->_errno;
}

That means, that multithreaded application must set global variable _REENT before
every libc call. No? Perhaps my understanding of things is completely wrong?

Any other suggestions?

Kind regards.
--
Dmitry.




--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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