On Wed, Dec 31, 2008 at 09:25:04AM +0100, Carmelo Amoroso wrote:
>[email protected] wrote:
>> Author: kraj
>> Date: 2008-12-31 00:31:38 +0000 (Wed, 31 Dec 2008)
>> New Revision: 24617
>> 
>> Log:
>> Merge some pre-work from branch, needed by NPTL.
>> 
>> 
>> Added:
>>    trunk/uClibc/extra/scripts/gen-as-const.awk
>>    trunk/uClibc/include/tls.h
>> 
>> Modified:
>>    trunk/uClibc/extra/Configs/Config.in
>>    trunk/uClibc/include/elf.h
>>    trunk/uClibc/include/fcntl.h
>>    trunk/uClibc/include/sched.h
>>    trunk/uClibc/include/time.h
>>    trunk/uClibc/include/unistd.h
>> 
>Hi Khem,
>that's a good idea. Remember that, as discussed with Bernhard recently,
>we should add a knob option for TLS, so USE_TLS should be in somehow
>controlled.
>I cannot currently actively contribute anyway. Just I can read sometime emails.
>
>Carmelo

>> Modified: trunk/uClibc/include/sched.h
>> ===================================================================
>> --- trunk/uClibc/include/sched.h     2008-12-30 19:15:22 UTC (rev 24616)
>> +++ trunk/uClibc/include/sched.h     2008-12-31 00:31:38 UTC (rev 24617)
>> @@ -79,6 +79,12 @@
>>  /* Get the CPU affinity for a task */
>>  extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
>>                            cpu_set_t *__cpuset) __THROW;
>> +
>> +extern int __clone (int (*__fn) (void *__arg), void *__child_stack,
>> +                int __flags, void *__arg, ...);
>> +extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base,
>> +                 size_t __child_stack_size, int __flags, void *__arg, ...);
>> +
>>  #endif
>>  
>>  __END_DECLS
>> 

I cannot find __clone nor __clone2 in any standard, please wrap them
with some meaningful guard as mentioned previously.

>> Added: trunk/uClibc/include/tls.h
>> ===================================================================
>> --- trunk/uClibc/include/tls.h                               (rev 0)
>> +++ trunk/uClibc/include/tls.h       2008-12-31 00:31:38 UTC (rev 24617)
>> @@ -0,0 +1,19 @@
>> +/* This file defines USE___THREAD to 1 or 0 to cut down on the #if mess.  */
>> +
>> +#ifndef _include_tls_h
>> +#define _include_tls_h 1
>> +
>> +#include_next <tls.h>
>> +
>> +#if USE_TLS && HAVE___THREAD \
>> +    && (!defined NOT_IN_libc || defined IS_IN_libpthread || defined 
>> IS_IN_librt)
>> +
>> +# define USE___THREAD 1
>> +
>> +#else
>> +
>> +# define USE___THREAD 0
>> +
>> +#endif
>> +
>> +#endif

1) Odd guard names
2) sounds like it is purely tls related and thus should be part of the
TLS patch.
>> 
>> Modified: trunk/uClibc/include/unistd.h
>> ===================================================================
>> --- trunk/uClibc/include/unistd.h    2008-12-30 19:15:22 UTC (rev 24616)
>> +++ trunk/uClibc/include/unistd.h    2008-12-31 00:31:38 UTC (rev 24617)
>> @@ -770,6 +770,8 @@
>>  libc_hidden_proto(vfork)
>>  #endif /* Use BSD. */
>>  
>> +/* Special exit function which only terminates the current thread.  */
>> +extern void __exit_thread (int val) __attribute__ ((noreturn));
>>  

Same as for __clone
>>  /* Return the pathname of the terminal FD is open on, or NULL on errors.
>>     The returned storage is good only until the next call to this function.  
>> */

Can we please first isolate futex and separate (!) TLS stuff in clean, C89 
compatible
patches that are sent to the list.
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to