This is the mail archive of the 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 1/4] Clean pthread functions namespaces for C11 threads

On 22/06/2017 16:35, Siddhesh Poyarekar wrote:
> On Tuesday 20 June 2017 12:22 AM, Adhemerval Zanella wrote:
>> This patch adds internal definition (through {libc_}hidden_{proto,def}) and
>> also change some strong to weak alias for symbols that might be used by C11
>> threads implementations.
>> The patchset should not change libc/libpthread functional, although object
>> changes are expected (since now internal symbols are used instead) and final
>> exported symbols through GLIBC_PRIVATE is also expanded (to cover libpthread
>> usage of __mmap{64}, __munmap, __mprotect).
>> Checked with a build for all major ABI (aarch64-linux-gnu, alpha-linux-gnu,
>> arm-linux-gnueabi, i386-linux-gnu, ia64-linux-gnu, m68k-linux-gnu,
>> microblaze-linux-gnu [1], mips{64}-linux-gnu, nios2-linux-gnu,
>> powerpc{64le}-linux-gnu, s390{x}-linux-gnu, sparc{64}-linux-gnu,
>> tile{pro,gx}-linux-gnu, and x86_64-linux-gnu).
> Looks OK with one small nit/comment below.

Thanks, I will push it upstream and split the C11 patch in small parts.

>> diff --git a/include/termios.h b/include/termios.h
>> index fad51f8..1a36e22 100644
>> --- a/include/termios.h
>> +++ b/include/termios.h
>> @@ -4,6 +4,8 @@
>>  #ifndef _ISOMAC
>>  /* Now define the internal interfaces.  */
>>  extern int __tcgetattr (int __fd, struct termios *__termios_p);
>> +extern int __tcsetattr (int __fd, int __optional_actions,
>> +			const struct termios *__termios_p);
>>  extern int __libc_tcdrain (int __fd);
>> diff --git a/include/time.h b/include/time.h
>> index 3a828e0..b72a3a3 100644
>> --- a/include/time.h
>> +++ b/include/time.h
>> @@ -78,7 +78,7 @@ extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct t
>>  extern int __nanosleep (const struct timespec *__requested_time,
>>  			struct timespec *__remaining);
>> -libc_hidden_proto (__nanosleep)
>> +hidden_proto (__nanosleep)
> Wouldn't it be more correct to define libc_hidden_* for IS_IN(libc) as
> well as IS_IN(pthread) in libc-symbols.h?  Basically just enable usage
> of all of the libc_* macros there for libc as well as libpthread.

It could be case, but then I think the 'libc_' will be misleading. I would
rather to just change to hidden_{proto,def} to symbol built on both
libc and libpthread.

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