[uClibc-cvs] svn commit: branches/uClibc-nptl: libc/stdlib/malloc-standard libc/sysdeps etc...

sjhill at uclibc.org sjhill at uclibc.org
Tue Aug 9 05:55:17 UTC 2005


Author: sjhill
Date: 2005-08-08 23:55:16 -0600 (Mon, 08 Aug 2005)
New Revision: 11078

Log:
Compile cleanups for NPTL support.


Added:
   branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/libc-lowlevellock.c

Modified:
   branches/uClibc-nptl/libc/stdlib/malloc-standard/Makefile
   branches/uClibc-nptl/libc/stdlib/malloc-standard/thread-freeres.c
   branches/uClibc-nptl/libc/sysdeps/linux/mips/__syscall_error.c
   branches/uClibc-nptl/libpthread/nptl/compat/libc-symbols.h
   branches/uClibc-nptl/libpthread/nptl/forward.c
   branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c
   branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c


Changeset:
Modified: branches/uClibc-nptl/libc/stdlib/malloc-standard/Makefile
===================================================================
--- branches/uClibc-nptl/libc/stdlib/malloc-standard/Makefile	2005-08-09 05:50:49 UTC (rev 11077)
+++ branches/uClibc-nptl/libc/stdlib/malloc-standard/Makefile	2005-08-09 05:55:16 UTC (rev 11078)
@@ -32,10 +32,9 @@
 # calloc.c can be found at uClibc/libc/stdlib/calloc.c
 # valloc.c can be found at uClibc/libc/stdlib/valloc.c
 CSRC=malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c
-#ifeq ($(PTHREADS_NATIVE),y)
-#CSRC+=thread-freeres.c
-#CFLAGS += -I$(TOPDIR)/libpthread/nptl/compat
-#endif
+ifeq ($(PTHREADS_NATIVE),y)
+CSRC += thread-freeres.c
+endif
 COBJS=$(patsubst %.c,%.o, $(CSRC))
 OBJS=$(COBJS)
 

Modified: branches/uClibc-nptl/libc/stdlib/malloc-standard/thread-freeres.c
===================================================================
--- branches/uClibc-nptl/libc/stdlib/malloc-standard/thread-freeres.c	2005-08-09 05:50:49 UTC (rev 11077)
+++ branches/uClibc-nptl/libc/stdlib/malloc-standard/thread-freeres.c	2005-08-09 05:55:16 UTC (rev 11078)
@@ -42,8 +42,19 @@
 
 DEFINE_HOOK (__libc_thread_subfreeres, (void));
 
+/*
+ * This needs a lot of work.
+ */
+#if 0
 void __attribute__ ((section ("__libc_thread_freeres_fn")))
 __libc_thread_freeres (void)
 {
   RUN_HOOK (__libc_thread_subfreeres, ());
 }
+#else
+void
+__libc_thread_freeres (void)
+{
+  return;
+}
+#endif

Modified: branches/uClibc-nptl/libc/sysdeps/linux/mips/__syscall_error.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/mips/__syscall_error.c	2005-08-09 05:50:49 UTC (rev 11077)
+++ branches/uClibc-nptl/libc/sysdeps/linux/mips/__syscall_error.c	2005-08-09 05:55:16 UTC (rev 11078)
@@ -22,7 +22,11 @@
 
 /* This routine is jumped to by all the syscall handlers, to stash
  * an error number into errno.  */
+#ifdef __PTHREADS_NATIVE__
+int __syscall_error(int err_no)
+#else
 int attribute_hidden __syscall_error(int err_no)
+#endif
 {
 	__set_errno(err_no);
 	return -1;

Modified: branches/uClibc-nptl/libpthread/nptl/compat/libc-symbols.h
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/compat/libc-symbols.h	2005-08-09 05:50:49 UTC (rev 11077)
+++ branches/uClibc-nptl/libpthread/nptl/compat/libc-symbols.h	2005-08-09 05:55:16 UTC (rev 11078)
@@ -201,4 +201,16 @@
 /* This should not appear outside `#if SHLIB_COMPAT (...)'.  */
 # define compat_symbol(lib, local, symbol, version) ...
 
+/* Move compatibility symbols out of the way by placing them all in a
+ *    special section.  */
+#ifndef __ASSEMBLER__
+# define attribute_compat_text_section \
+	    __attribute__ ((section (".text.compat")))
+# define attribute_compat_data_section \
+	    __attribute__ ((section (".data.compat")))
+#else
+# define compat_text_section .section ".text.compat", "ax";
+# define compat_data_section .section ".data.compat", "aw";
+#endif
+
 #endif /* _LIBC_SYMBOLS_H */

Modified: branches/uClibc-nptl/libpthread/nptl/forward.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/forward.c	2005-08-09 05:50:49 UTC (rev 11077)
+++ branches/uClibc-nptl/libpthread/nptl/forward.c	2005-08-09 05:55:16 UTC (rev 11078)
@@ -191,7 +191,6 @@
 
 FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
 
-#ifndef __UCLIBC__
 #define return /* value is void */
 FORWARD2(__pthread_unwind,
 	 void attribute_hidden __attribute ((noreturn)) __cleanup_fct_attribute
@@ -202,4 +201,3 @@
 		       INTERNAL_SYSCALL (kill, err, 1, SIGKILL);
 		     })
 #undef return
-#endif

Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c	2005-08-09 05:50:49 UTC (rev 11077)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c	2005-08-09 05:55:16 UTC (rev 11078)
@@ -22,6 +22,11 @@
 #include <unwind.h>
 #include <pthreadP.h>
 
+#ifdef __UCLIBC__
+#define __libc_dlopen(x)	dlopen(x, (RTLD_LOCAL | RTLD_LAZY))
+#define __libc_dlsym		dlsym
+#endif
+
 static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
 static _Unwind_Reason_Code (*libgcc_s_personality)
   (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,

Added: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/libc-lowlevellock.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/libc-lowlevellock.c	2005-08-09 05:50:49 UTC (rev 11077)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/libc-lowlevellock.c	2005-08-09 05:55:16 UTC (rev 11078)
@@ -0,0 +1,21 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Paul Mackerras <paulus at au.ibm.com>, 2003.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* No difference to lowlevellock.c, except we lose a couple of functions.  */
+#include "../lowlevellock.c"

Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c	2005-08-09 05:50:49 UTC (rev 11077)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c	2005-08-09 05:55:16 UTC (rev 11078)
@@ -18,9 +18,6 @@
    02111-1307 USA.  */
 
 #include <unistd.h>
-#ifdef __UCLIBC__
-extern pid_t __libc_fork(void);
-#endif
 
 pid_t
 __fork (void)




More information about the uClibc-cvs mailing list