Re: svn commit: branches/uClibc-nptl: include libc/stdlib/malloc-standard libc etc...
Chris Metcalf wrote: On 7/29/2008 10:50 AM, Carmelo AMOROSO wrote: Carmelo AMOROSO wrote: [...] libc/misc/utmp/utent.c:38: warning: braces around scalar initializer libc/misc/utmp/utent.c:38: warning: (near initialization for 'utmplock.__data.__spins') any idea ? I'm not sure it's related to use of futex. Carmelo Looked at this better, and I'm convinced it's not correct. pthread_mutex_t contains all scalar entries, extra braces are not required. I'm also seeing this in my port on the tile architecture, using the latest nptl branch code now. In my build I use -Werror, since I don't want to accidentally start building code with obvious warnings in it, so I'll have to #ifdef the extra braces away on our architecture (yuck). I have a different, though somewhat related problem; I've changed the lowlevellock code to be more efficient on our architecture, so the int __lock has to be __lll_lock_t lock (a two-word struct), and I pull that type and the __LLL_LOCK_INITIALIZER into pthreadtypes.h, then use it in pthread.h. But maybe we should just admit that there's going to be architectural skew here, and move the definition of the initializer into the per-architecture pthreadtypes.h, to go next to the actual structure definition that it's initializing? Hi Chris, let me have a look... Carmelo ___ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc
Re: svn commit: branches/uClibc-nptl: include libc/stdlib/malloc-standard libc etc...
On 7/29/2008 10:50 AM, Carmelo AMOROSO wrote: Carmelo AMOROSO wrote: [...] libc/misc/utmp/utent.c:38: warning: braces around scalar initializer libc/misc/utmp/utent.c:38: warning: (near initialization for 'utmplock.__data.__spins') any idea ? I'm not sure it's related to use of futex. Carmelo Looked at this better, and I'm convinced it's not correct. pthread_mutex_t contains all scalar entries, extra braces are not required. I'm also seeing this in my port on the tile architecture, using the latest nptl branch code now. In my build I use -Werror, since I don't want to accidentally start building code with obvious warnings in it, so I'll have to #ifdef the extra braces away on our architecture (yuck). I have a different, though somewhat related problem; I've changed the lowlevellock code to be more efficient on our architecture, so the int __lock has to be __lll_lock_t lock (a two-word struct), and I pull that type and the __LLL_LOCK_INITIALIZER into pthreadtypes.h, then use it in pthread.h. But maybe we should just admit that there's going to be architectural skew here, and move the definition of the initializer into the per-architecture pthreadtypes.h, to go next to the actual structure definition that it's initializing? -- Chris Metcalf, Tilera Corp. http://www.tilera.com ___ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc
Re: svn commit: branches/uClibc-nptl: include libc/stdlib/malloc-standard libc etc...
Carmelo AMOROSO wrote: [EMAIL PROTECTED] wrote: Author: kraj Date: 2008-07-11 15:22:24 -0700 (Fri, 11 Jul 2008) New Revision: 22805 Log: Signed-off-by: Khem Raj [EMAIL PROTECTED] Hush compiler for extern inline warnings by using __extern_inline macro, this also makes gcc 4.3 happy. warning: C99 inline functions are not supported; using GNU89 warning: to disable this warning use -fgnu89-inline or the gnu Also fix this other warning. warning: missing braces around initializer warning: (near initialization for '_stdio_streams[0].__lock.__ Modified: branches/uClibc-nptl/include/ctype.h branches/uClibc-nptl/libc/stdlib/malloc-standard/malloc.h branches/uClibc-nptl/libc/sysdeps/linux/common/bits/cmathcalls.h branches/uClibc-nptl/libc/sysdeps/linux/common/bits/uClibc_mutex.h branches/uClibc-nptl/libc/sysdeps/linux/m68k/bits/mathinline.h branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/pthread.h [SNIP] Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/pthread.h === --- branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/pthread.h 2008-07-11 22:20:59 UTC (rev 22804) +++ branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/pthread.h 2008-07-11 22:22:24 UTC (rev 22805) @@ -65,22 +65,22 @@ /* Mutex initializers. */ #define PTHREAD_MUTEX_INITIALIZER \ - { { 0, 0, 0, 0, 0, 0 } } + { { 0, 0, 0, 0, 0, { 0 } } } #ifdef __USE_GNU # if __WORDSIZE == 64 # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0 } } + { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, { 0 } } } # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0 } } + { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, { 0 } } } # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0 } } + { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, { 0 } } } # else # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, 0 } } + { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } } # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, 0 } } + { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { 0 } } } # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, 0 } } + { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { 0 } } } # endif #endif Hi Khem, this change is producing new warnings on my side: sh4-linux-uclibc-gcc -c libc/misc/utmp/utent.c -o libc/misc/utmp/utent.os -include ./include/libc-symbols.h -Wall -Wstrict-prototypes -fno-strict-aliasing -ml -m4 -fno-stack-protector -fno-builtin -nostdinc -I./include -I. -I./libc/sysdeps/linux/sh -DUCLIBC_INTERNAL -std=gnu99 -Os -funit-at-a-time -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -fstrict-aliasing -mprefergot -DNDEBUG -I./libpthread/nptl -I./libpthread/nptl/sysdeps/unix/sysv/linux/sh/sh4 -I./libpthread/nptl/sysdeps/unix/sysv/linux/sh -I./libpthread/nptl/sysdeps/sh -I./libpthread/nptl/sysdeps/unix/sysv/linux -I./libpthread/nptl/sysdeps/pthread -I./libpthread/nptl/sysdeps/pthread/bits -I./libpthread/nptl/sysdeps/generic -I./ldso/ldso/sh -I./ldso/include -I/opt/STM/STLinux-2.3/devkit/sh4_uclibc/target/usr/include/ -I/opt/STM/STLinux-2.3/devkit/sh4_uclibc/lib/gcc/sh4-linux-uclibc/4.2.1//include-fixed -I/opt/STM/STLinux-2.3/devkit/sh4_uclibc/lib/gcc/sh4-linux-uclibc/4.2.1/include -DNDEBUG -D__USE_STDIO_FUTEXES__ -fPIC -DPIC -MT libc/misc/utmp/utent.os -MD -MP -MF libc/misc/utmp/.utent.os.dep libc/misc/utmp/utent.c:38: warning: braces around scalar initializer libc/misc/utmp/utent.c:38: warning: (near initialization for 'utmplock.__data.__spins') any idea ? I'm not sure it's related to use of futex. Carmelo Looked at this better, and I'm convinced it's not correct. pthread_mutex_t contains all scalar entries, extra braces are not required. ___ uClibc-cvs mailing list [EMAIL PROTECTED] http://busybox.net/cgi-bin/mailman/listinfo/uclibc-cvs ___ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc
Re: svn commit: branches/uClibc-nptl: include libc/stdlib/malloc-standard libc etc...
On (29/07/08 16:50), Carmelo AMOROSO wrote: Carmelo AMOROSO wrote: [EMAIL PROTECTED] wrote: Author: kraj Date: 2008-07-11 15:22:24 -0700 (Fri, 11 Jul 2008) New Revision: 22805 Log: Signed-off-by: Khem Raj [EMAIL PROTECTED] Hush compiler for extern inline warnings by using __extern_inline macro, this also makes gcc 4.3 happy. warning: C99 inline functions are not supported; using GNU89 warning: to disable this warning use -fgnu89-inline or the gnu Also fix this other warning. warning: missing braces around initializer warning: (near initialization for '_stdio_streams[0].__lock.__ libc/misc/utmp/utent.c:38: warning: braces around scalar initializer libc/misc/utmp/utent.c:38: warning: (near initialization for 'utmplock.__data.__spins') any idea ? I'm not sure it's related to use of futex. Carmelo Looked at this better, and I'm convinced it's not correct. pthread_mutex_t contains all scalar entries, extra braces are not required. well for arm and sh the union pthread_mutex_t are not same. ARM uses an aggregate inside this union __extension__ union { int __spins; __pthread_slist_t __list; }; hence needs the braces around it and sh does not so it warns about the braces. look at the definitions in nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h and nptl/sysdeps/unix/sysv/linux/arm/bits/pthreadtypes.h -Khem ___ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc
Re: svn commit: branches/uClibc-nptl: include libc/stdlib/malloc-standard libc etc...
On (29/07/08 17:50), Carmelo AMOROSO wrote: [EMAIL PROTECTED] wrote: Author: kraj Date: 2008-07-11 15:22:24 -0700 (Fri, 11 Jul 2008) New Revision: 22805 Log: Signed-off-by: Khem Raj [EMAIL PROTECTED] Hush compiler for extern inline warnings by using __extern_inline macro, this also makes gcc 4.3 happy. warning: C99 inline functions are not supported; using GNU89 warning: to disable this warning use -fgnu89-inline or the gnu Also fix this other warning. warning: missing braces around initializer warning: (near initialization for '_stdio_streams[0].__lock.__ Modified: branches/uClibc-nptl/include/ctype.h branches/uClibc-nptl/libc/stdlib/malloc-standard/malloc.h branches/uClibc-nptl/libc/sysdeps/linux/common/bits/cmathcalls.h branches/uClibc-nptl/libc/sysdeps/linux/common/bits/uClibc_mutex.h branches/uClibc-nptl/libc/sysdeps/linux/m68k/bits/mathinline.h branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/pthread.h Changeset: Modified: branches/uClibc-nptl/libc/stdlib/malloc-standard/malloc.h === --- branches/uClibc-nptl/libc/stdlib/malloc-standard/malloc.h 2008-07-11 22:20:59 UTC (rev 22804) +++ branches/uClibc-nptl/libc/stdlib/malloc-standard/malloc.h 2008-07-11 22:22:24 UTC (rev 22805) @@ -23,6 +23,7 @@ #include stdlib.h #include sys/mman.h #include bits/uClibc_mutex.h +#include bits/libc-lock.h libc_hidden_proto(mmap) libc_hidden_proto(sysconf) Hi Khem, may you explain why this is needed ? for _pthread_cleanup_push/pop warning ? yes. ___ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc