On Mon, 4 Apr 2016, Martin Natano wrote:
> On Sun, Apr 03, 2016 at 08:20:57PM -0700, Philip Guenther wrote:
...
> > So, diff below converts several uses of _THREAD_PRIVATE_MUTEX_*() to 
> > _MUTEX_*().  Regress tests libc/stdio_threading/* and asr/bin/threads 
> > still pass with this.
> 
> I think the mutex in gen/getpwent.c and the 'lcl' and 'gmt' mutexes in 
> time/localtime.c could be replaced too. See comment inline.

I looked at those just enough to notice that
a) time/localtime.c has _THREAD_PRIVATE() uses for both localtime and 
   gmtime, raising the question of whether the 'lcl' and 'gmt' mutexes 
   should really be 'localtime' and 'gmtime' and sharing backing bits
   with those, and
b) gen/getgrent.c uses 'gr' with both _THREAD_PRIVATE() and 
   _THREAD_PRIVATE_MUTEX_LOCK(); should gen/getpwent.c look a lot more 
   like that?

Or not.  Digging in on those is on my list, though I wouldn't cry if 
someone else did the analysis of whether our getpwent.c is behind the 
curve, standard-wise.  :-)

...
> > --- stdlib/random.c 16 Jan 2015 16:48:51 -0000      1.29
> > +++ stdlib/random.c 4 Apr 2016 00:47:53 -0000
> > @@ -176,10 +176,11 @@ static int rand_sep = SEP_3;
> >  static int random_deterministic;
> >  
> >  _THREAD_PRIVATE_MUTEX(random);
> 
> This line can be removed.

Ah, yes.  Gone.


Philip

Reply via email to