diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-01-16 13:43:30 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-01-16 13:43:30 +0000 |
commit | 338237994ac93ca58f6024ef0f7932ab770735d1 (patch) | |
tree | 4417f2f77bc3224e09979303a45e2cd76c5d14be /libpthread/linuxthreads | |
parent | 76374f68fbc07420cd459b0d0fae424895ea4141 (diff) |
s/UCLIBC_HAS_MMU/ARCH_HAS_MMU/g
Diffstat (limited to 'libpthread/linuxthreads')
-rw-r--r-- | libpthread/linuxthreads/internals.h | 10 | ||||
-rw-r--r-- | libpthread/linuxthreads/manager.c | 12 | ||||
-rw-r--r-- | libpthread/linuxthreads/ptfork.c | 2 | ||||
-rw-r--r-- | libpthread/linuxthreads/pthread.c | 8 |
4 files changed, 16 insertions, 16 deletions
diff --git a/libpthread/linuxthreads/internals.h b/libpthread/linuxthreads/internals.h index bce6b7efe..bd362642b 100644 --- a/libpthread/linuxthreads/internals.h +++ b/libpthread/linuxthreads/internals.h @@ -257,12 +257,12 @@ extern pthread_descr __pthread_main_thread; * 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 @@ static inline int invalid_handle(pthread_handle h, pthread_t id) 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 @@ static inline pthread_descr thread_self (void) 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 @@ static inline pthread_descr thread_self (void) else { return __pthread_find_self(); } -#endif /* __UCLIBC_HAS_MMU__ */ +#endif /* __ARCH_HAS_MMU__ */ #endif } diff --git a/libpthread/linuxthreads/manager.c b/libpthread/linuxthreads/manager.c index f7301bc52..11ec6f18c 100644 --- a/libpthread/linuxthreads/manager.c +++ b/libpthread/linuxthreads/manager.c @@ -363,7 +363,7 @@ static int pthread_allocate_stack(const pthread_attr_t *attr, } 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 @@ static int pthread_allocate_stack(const pthread_attr_t *attr, /* 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 @@ PDEBUG("cloning new_thread = %p\n", new_thread); /* 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 @@ static void pthread_free(pthread_descr th) /* 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 @@ static void pthread_free(pthread_descr th) if (!th->p_userstack) { free(h_bottom_save); } -#endif /* __UCLIBC_HAS_MMU__ */ +#endif /* __ARCH_HAS_MMU__ */ } /* Handle threads that have exited */ diff --git a/libpthread/linuxthreads/ptfork.c b/libpthread/linuxthreads/ptfork.c index 5ed380555..364db7e69 100644 --- a/libpthread/linuxthreads/ptfork.c +++ b/libpthread/linuxthreads/ptfork.c @@ -74,7 +74,7 @@ static inline void pthread_call_handlers(struct handler_list * list) { 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) diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c index 1c24cccd8..e9ca9aa32 100644 --- a/libpthread/linuxthreads/pthread.c +++ b/libpthread/linuxthreads/pthread.c @@ -175,9 +175,9 @@ char *__pthread_initial_thread_bos = NULL; * 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 @@ static void pthread_initialize(void) 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 @@ static void pthread_initialize(void) __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 |