This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4] Make bindresvport() function to multithread-safe
On Fri, Sep 28, 2012 at 11:28 AM, Pedro Alves <palves@redhat.com> wrote:
> On 09/28/2012 03:45 PM, Carlos O'Donell wrote:
>> On 9/28/2012 10:42 AM, Pedro Alves wrote:
>>> On 09/28/2012 03:27 PM, Carlos O'Donell wrote:
>>>> Call this __get_uid(), since that's what you're doing.
>>>
>>> That's terribly confusing with getuid.
>>
>> And your suggestion is?
>
> Some:
>
> __get_initial_port
> __get_initial_port_dividend
> __get_port
> __get_port_dividend
> __get_id_for_port
> __get_id_for_initial_port
> __get_id_for_initial_port_dividend
> __get_pid_for_port
> __get_pid_for_initial_port
> __get_pid_for_initial_port_dividend
>
> (initial, because if the first attempt fails, bindresvport
> increments and tries again, etc.)
> (dividend, because this doesn't really return a port,
> but the dividend to be used in a modulus operation.)
How about __get_unique_id?
The macro returns what should be a unique ID used for the hash.
Cheers,
Carlos.