This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v5] Make bindresvport() function to multithread-safe
On 10/16/2012 05:20 PM, Andreas Schwab wrote:
> Peng Haitao <penght@cn.fujitsu.com> writes:
>
>> +#ifdef INTERNAL_SYSCALL
>> +#define __get_unique_id() \
>> + ({ \
>> + INTERNAL_SYSCALL_DECL (err); \
>> + short __port; \
>> + __port = INTERNAL_SYSCALL (gettid, err, 0); \
>> + __port; \
>> + })
>> +#else
>> +#define __get_unique_id() \
>> + ({ \
>> + short __port; \
>> + __port = INLINE_SYSCALL (gettid, 0); \
>> + __port; \
>> + })
>> +#endif /* INTERNAL_SYSCALL */
>
> That should be an inline function.
>
First, Carlos O'Donell suggestion define a macro.
http://sourceware.org/ml/libc-alpha/2012-09/msg00590.html
Second, your suggestion is different with H.J. Lu:(
http://sourceware.org/ml/libc-alpha/2012-09/msg00762.html
So I do not modify macro to inline function.
Thanks.
--
Best Regards,
Peng