This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] Make bindresvport() function to multithread-safe


On 09/18/2012 03:04 AM, Mike Frysinger wrote:
> On Friday 17 February 2012 01:00:45 Peng Haitao wrote:
>> @@ -64,6 +70,8 @@ bindresvport (int sd, struct sockaddr_in *sin)
>>        return -1;
>>      }
>>
>> +  __libc_lock_lock (lock);
>> +
>>    if (port == 0)
>>      {
>>        port = (__getpid () % NPORTS) + STARTPORT;
> 
> should the lock be acquired here ?  or should it be moved to right before the 
> "again" label ?  i think the latter ...
> -mike
> 

Yeah, thanks.
I will send a new patch.

-- 
Best Regards,
Peng


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