This is the mail archive of the cygwin-patches@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: [PATCH] Re: pthread


----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>
To: <cygwin-xfree@cygwin.com>; <cygwin-patches@cygwin.com>
Sent: Tuesday, April 17, 2001 1:20 AM
Subject: Re: [PATCH] Re: pthread


> On Mon, Apr 16, 2001 at 09:06:27PM +1000, Robert Collins wrote:
> >Hi Suhaib,
> >    here are the two missing functions. If you aren't setup to
compile
> >cygwin1.dll let me know and I'll mail you mine.
>
> You seem to be adding a mutex that is supplanting the passwd_sem
variable.
> Shouldn't passwd_sem be eliminated if you are adding this?

No. passwd_sem is not even a real semaphore. It's simply used to stop
security.cc looking calling getpwuid when fopen is called. Passwd_sem as
a static variable has almost no overhead on access, a real semaphore or
a trylock() on the mutex in security.cc will have a performance hit.
Rob

> cgf
> >===
> >Mon Apr 16 21:02:00 2001  Robert Collins <rbtcollins@hotmail.com>
> >
> > * cygwin.din: Export New functions.
> > * passwd.cc (read_etc_passwd): Make race safe.
> > (getpwuid_r): New function.
> > (getpwnam_r): New function.
> >
> >===
>


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