[uClibc-cvs] uClibc/libpthread/linuxthreads internals.h, 1.6, 1.7 manager.c, 1.7, 1.8 ptfork.c, 1.2, 1.3 pthread.c, 1.11, 1.12

Erik Andersen andersen at uclibc.org
Fri Jan 16 13:43:30 UTC 2004


Update of /var/cvs/uClibc/libpthread/linuxthreads
In directory nail:/home/andersen/CVS/uClibc/libpthread/linuxthreads

Modified Files:
	internals.h manager.c ptfork.c pthread.c 
Log Message:
s/UCLIBC_HAS_MMU/ARCH_HAS_MMU/g


Index: internals.h
===================================================================
RCS file: /var/cvs/uClibc/libpthread/linuxthreads/internals.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- internals.h	1 Aug 2003 20:08:59 -0000	1.6
+++ internals.h	16 Jan 2004 13:43:27 -0000	1.7
@@ -257,12 +257,12 @@
  * the bounds a-priori. -StS */
 
 extern char *__pthread_initial_thread_bos;
-#ifndef __UCLIBC_HAS_MMU__
+#ifndef __ARCH_HAS_MMU__
 extern char *__pthread_initial_thread_tos;
 #define NOMMU_INITIAL_THREAD_BOUNDS(tos,bos) if ((tos)>=__pthread_initial_thread_bos && (bos)<=__pthread_initial_thread_tos) __pthread_initial_thread_bos = (tos)+1
 #else
 #define NOMMU_INITIAL_THREAD_BOUNDS(tos,bos) /* empty */
-#endif /* __UCLIBC_HAS_MMU__ */
+#endif /* __ARCH_HAS_MMU__ */
 
 
 /* Indicate whether at least one thread has a user-defined stack (if 1),
@@ -324,7 +324,7 @@
    THREAD_SELF implementation is used, this must be a power of two and
    a multiple of PAGE_SIZE.  */
 #ifndef STACK_SIZE
-#ifdef __UCLIBC_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
 #define STACK_SIZE  (2 * 1024 * 1024)
 #else
 #define STACK_SIZE  (4 * PAGE_SIZE)
@@ -381,7 +381,7 @@
   return THREAD_SELF;
 #else
   char *sp = CURRENT_STACK_FRAME;
-#ifdef __UCLIBC_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
   if (sp >= __pthread_initial_thread_bos)
     return &__pthread_initial_thread;
   else if (sp >= __pthread_manager_thread_bos
@@ -414,7 +414,7 @@
   else {
       return __pthread_find_self();
   }
-#endif /* __UCLIBC_HAS_MMU__ */
+#endif /* __ARCH_HAS_MMU__ */
 #endif
 }
 

Index: pthread.c
===================================================================
RCS file: /var/cvs/uClibc/libpthread/linuxthreads/pthread.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- pthread.c	1 Aug 2003 20:08:59 -0000	1.11
+++ pthread.c	16 Jan 2004 13:43:27 -0000	1.12
@@ -175,9 +175,9 @@
  * This is adapted when other stacks are malloc'ed since we don't know
  * the bounds a-priori. -StS */
 
-#ifndef __UCLIBC_HAS_MMU__
+#ifndef __ARCH_HAS_MMU__
 char *__pthread_initial_thread_tos = NULL;
-#endif /* __UCLIBC_HAS_MMU__ */
+#endif /* __ARCH_HAS_MMU__ */
 
 /* File descriptor for sending requests to the thread manager. */
 /* Initially -1, meaning that the thread manager is not running. */
@@ -336,7 +336,7 @@
      beyond STACK_SIZE minus two pages (one page for the thread descriptor
      immediately beyond, and one page to act as a guard page). */
 
-#ifdef __UCLIBC_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
   /* We cannot allocate a huge chunk of memory to mmap all thread stacks later
    * on a non-MMU system. Thus, we don't need the rlimit either. -StS */
   getrlimit(RLIMIT_STACK, &limit);
@@ -355,7 +355,7 @@
   __pthread_initial_thread_bos = (char *) 1; /* set it non-zero so we know we have been here */
   PDEBUG("initial thread stack bounds: bos=%p, tos=%p\n",
 	 __pthread_initial_thread_bos, __pthread_initial_thread_tos);
-#endif /* __UCLIBC_HAS_MMU__ */
+#endif /* __ARCH_HAS_MMU__ */
 
   /* Setup signal handlers for the initial thread.
      Since signal handlers are shared between threads, these settings

Index: ptfork.c
===================================================================
RCS file: /var/cvs/uClibc/libpthread/linuxthreads/ptfork.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ptfork.c	5 Nov 2003 02:12:56 -0000	1.2
+++ ptfork.c	16 Jan 2004 13:43:27 -0000	1.3
@@ -74,7 +74,7 @@
 {
   for (/*nothing*/; list != NULL; list = list->next) (list->handler)();
 }
-#ifdef __UCLIBC_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
 extern int __libc_fork(void);
 
 pid_t __fork(void)

Index: manager.c
===================================================================
RCS file: /var/cvs/uClibc/libpthread/linuxthreads/manager.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- manager.c	1 Aug 2003 20:08:59 -0000	1.7
+++ manager.c	16 Jan 2004 13:43:27 -0000	1.8
@@ -363,7 +363,7 @@
     }
   else
     {
-#ifdef __UCLIBC_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
       stacksize = STACK_SIZE - pagesize;
       if (attr != NULL)
         stacksize = MIN (stacksize, roundup(attr->__stacksize, pagesize));
@@ -453,7 +453,7 @@
       /* on non-MMU systems we always have non-standard stack frames */
       __pthread_nonstandard_stacks = 1;
       
-#endif /* __UCLIBC_HAS_MMU__ */
+#endif /* __ARCH_HAS_MMU__ */
     }
 
   /* Clear the thread data structure.  */
@@ -627,14 +627,14 @@
     /* Free the stack if we allocated it */
     if (attr == NULL || !attr->__stackaddr_set)
       {
-#ifdef __UCLIBC_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
 	if (new_thread->p_guardsize != 0)
 	  munmap(new_thread->p_guardaddr, new_thread->p_guardsize);
 	munmap((caddr_t)((char *)(new_thread+1) - INITIAL_STACK_SIZE),
 	       INITIAL_STACK_SIZE);
 #else
 	free(new_thread_bottom);
-#endif /* __UCLIBC_HAS_MMU__ */
+#endif /* __ARCH_HAS_MMU__ */
       }
     __pthread_handles[sseg].h_descr = NULL;
     __pthread_handles[sseg].h_bottom = NULL;
@@ -711,7 +711,7 @@
 
   /* If initial thread, nothing to free */
   if (th == &__pthread_initial_thread) return;
-#ifdef __UCLIBC_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
   if (!th->p_userstack)
     {
       /* Free the stack and thread descriptor area */
@@ -724,7 +724,7 @@
   if (!th->p_userstack) {
       free(h_bottom_save);
   }
-#endif /* __UCLIBC_HAS_MMU__ */
+#endif /* __ARCH_HAS_MMU__ */
 }
 
 /* Handle threads that have exited */




More information about the uClibc-cvs mailing list