svn commit: trunk/uClibc: extra/Configs include include/sys libc/ etc...
vapier at uclibc.org
vapier at uclibc.org
Sat Feb 18 07:03:34 UTC 2006
Author: vapier
Date: 2006-02-17 23:03:24 -0800 (Fri, 17 Feb 2006)
New Revision: 14112
Log:
tweak the idea between having a MMU and actually using it
Modified:
trunk/uClibc/Makefile.in
trunk/uClibc/extra/Configs/Config.in.arch
trunk/uClibc/include/sys/mman.h
trunk/uClibc/include/unistd.h
trunk/uClibc/libc/inet/rpc/rcmd.c
trunk/uClibc/libc/misc/internals/__uClibc_main.c
trunk/uClibc/libc/stdlib/malloc-simple/alloc.c
trunk/uClibc/libc/stdlib/malloc-standard/malloc.h
trunk/uClibc/libc/stdlib/malloc/malloc.c
trunk/uClibc/libc/stdlib/malloc/malloc.h
trunk/uClibc/libc/sysdeps/linux/arm/crt1.S
trunk/uClibc/libc/sysdeps/linux/common/bits/posix_opt.h
trunk/uClibc/libc/sysdeps/linux/common/fork.c
trunk/uClibc/libc/sysdeps/linux/common/ioperm.c
trunk/uClibc/libc/sysdeps/linux/common/iopl.c
trunk/uClibc/libc/sysdeps/linux/common/mlock.c
trunk/uClibc/libc/sysdeps/linux/common/mlockall.c
trunk/uClibc/libc/sysdeps/linux/common/munlock.c
trunk/uClibc/libc/sysdeps/linux/common/munlockall.c
trunk/uClibc/libc/unistd/Makefile.in
trunk/uClibc/libc/unistd/exec.c
trunk/uClibc/libpthread/linuxthreads.old/internals.h
trunk/uClibc/libpthread/linuxthreads.old/manager.c
trunk/uClibc/libpthread/linuxthreads.old/ptfork.c
trunk/uClibc/libpthread/linuxthreads.old/pthread.c
trunk/uClibc/libpthread/linuxthreads/manager.c
trunk/uClibc/libutil/Makefile.in
trunk/uClibc/test/test-skeleton.c
trunk/uClibc/test/unistd/fork.c
Changeset:
Modified: trunk/uClibc/Makefile.in
===================================================================
--- trunk/uClibc/Makefile.in 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/Makefile.in 2006-02-18 07:03:24 UTC (rev 14112)
@@ -45,7 +45,7 @@
# in order to generate the headers correctly :(. That
# means we can't use the $(HOSTCC) in order to get the
# correct output.
-ifeq ($(ARCH_HAS_MMU),y)
+ifeq ($(ARCH_USE_MMU),y)
export header_extra_args =
else
export header_extra_args = -n
Modified: trunk/uClibc/extra/Configs/Config.in.arch
===================================================================
--- trunk/uClibc/extra/Configs/Config.in.arch 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/extra/Configs/Config.in.arch 2006-02-18 07:03:24 UTC (rev 14112)
@@ -48,6 +48,16 @@
Most people will answer Y.
+config ARCH_USE_MMU
+ bool "Do you want to utilize the MMU?"
+ depends on ARCH_HAS_MMU
+ default y
+ help
+ If your target CPU has a MMU, and you wish to actually utilize it,
+ then answer Y here. Normal Linux requires an MMU.
+
+ If you're unsure, answer Y.
+
config UCLIBC_HAS_FLOATS
bool "Enable floating point number support"
default y
Modified: trunk/uClibc/include/sys/mman.h
===================================================================
--- trunk/uClibc/include/sys/mman.h 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/include/sys/mman.h 2006-02-18 07:03:24 UTC (rev 14112)
@@ -99,7 +99,7 @@
extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW;
#endif
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
/* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
be memory resident. */
extern int mlock (__const void *__addr, size_t __len) __THROW;
Modified: trunk/uClibc/include/unistd.h
===================================================================
--- trunk/uClibc/include/unistd.h 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/include/unistd.h 2006-02-18 07:03:24 UTC (rev 14112)
@@ -703,7 +703,7 @@
#endif
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
/* Clone the calling process, creating an exact copy.
Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
@@ -885,7 +885,7 @@
extern void setusershell (void) __THROW; /* Rewind and re-read the file. */
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
/* Put the program in the background, and dissociate from the controlling
terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero,
redirects stdin, stdout, and stderr to /dev/null. */
Modified: trunk/uClibc/libc/inet/rpc/rcmd.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/rcmd.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/inet/rpc/rcmd.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -174,7 +174,7 @@
#ifdef __UCLIBC_HAS_REENTRANT_RPC__
hstbuflen = 1024;
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
tmphstbuf = alloca (hstbuflen);
#else
tmphstbuf = malloc (hstbuflen);
@@ -186,7 +186,7 @@
if (herr != NETDB_INTERNAL || errno != ERANGE)
{
__set_h_errno (herr);
-#ifndef __ARCH_HAS_MMU__
+#ifndef __ARCH_USE_MMU__
free(tmphstbuf);
#endif
herror(*ahost);
@@ -196,7 +196,7 @@
{
/* Enlarge the buffer. */
hstbuflen *= 2;
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
tmphstbuf = alloca (hstbuflen);
#else
if (tmphstbuf) {
@@ -206,7 +206,7 @@
#endif
}
}
-#ifndef __ARCH_HAS_MMU__
+#ifndef __ARCH_USE_MMU__
free(tmphstbuf);
#endif
#else /* call the non-reentrant version */
@@ -388,7 +388,7 @@
#ifdef __UCLIBC_HAS_REENTRANT_RPC__
buflen = 1024;
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
buffer = alloca (buflen);
#else
buffer = malloc (buflen);
@@ -398,7 +398,7 @@
buflen, &hp, &herr) != 0 || hp == NULL)
{
if (herr != NETDB_INTERNAL || errno != ERANGE) {
-#ifndef __ARCH_HAS_MMU__
+#ifndef __ARCH_USE_MMU__
free(buffer);
#endif
return -1;
@@ -406,7 +406,7 @@
{
/* Enlarge the buffer. */
buflen *= 2;
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
buffer = alloca (buflen);
#else
if (buffer) {
@@ -416,7 +416,7 @@
#endif
}
}
-#ifndef __ARCH_HAS_MMU__
+#ifndef __ARCH_USE_MMU__
free(buffer);
#endif
#else
@@ -513,7 +513,7 @@
#ifdef __UCLIBC_HAS_REENTRANT_RPC__
size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX);
struct passwd pwdbuf;
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
char *buffer = alloca (buflen);
#else
char *buffer = malloc (buflen);
@@ -522,12 +522,12 @@
if (getpwnam_r (luser, &pwdbuf, buffer,
buflen, &pwd) != 0 || pwd == NULL)
{
-#ifndef __ARCH_HAS_MMU__
+#ifndef __ARCH_USE_MMU__
free(buffer);
#endif
return -1;
}
-#ifndef __ARCH_HAS_MMU__
+#ifndef __ARCH_USE_MMU__
free(buffer);
#endif
#else
Modified: trunk/uClibc/libc/misc/internals/__uClibc_main.c
===================================================================
--- trunk/uClibc/libc/misc/internals/__uClibc_main.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/misc/internals/__uClibc_main.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -33,7 +33,7 @@
#ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
libc_hidden_proto(strrchr)
#endif
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
libc_hidden_proto(memcpy)
libc_hidden_proto(getgid)
libc_hidden_proto(getuid)
@@ -131,7 +131,7 @@
# define O_NOFOLLOW 0
#endif
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
static void __check_one_fd(int fd, int mode)
{
/* Check if the specified fd is already open */
@@ -272,7 +272,7 @@
char **argv, void (*app_init)(void), void (*app_fini)(void),
void (*rtld_fini)(void), void *stack_end)
{
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
unsigned long *aux_dat;
ElfW(auxv_t) auxvt[AT_EGID + 1];
#endif
@@ -293,7 +293,7 @@
__environ = &argv[argc];
}
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
/* Pull stuff from the ELF header when possible */
aux_dat = (unsigned long*)__environ;
while (*aux_dat) {
@@ -314,7 +314,7 @@
* __uClibc_init() regardless, to be sure the right thing happens. */
__uClibc_init();
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
/* Make certain getpagesize() gives the correct answer */
__pagesize = (auxvt[AT_PAGESZ].a_un.a_val)? auxvt[AT_PAGESZ].a_un.a_val : PAGE_SIZE;
Modified: trunk/uClibc/libc/stdlib/malloc/malloc.c
===================================================================
--- trunk/uClibc/libc/stdlib/malloc/malloc.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/stdlib/malloc/malloc.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -106,7 +106,7 @@
#else /* !MALLOC_USE_SBRK */
/* Otherwise, use mmap. */
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
block = mmap ((void *)0, block_size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
#else
Modified: trunk/uClibc/libc/stdlib/malloc/malloc.h
===================================================================
--- trunk/uClibc/libc/stdlib/malloc/malloc.h 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/stdlib/malloc/malloc.h 2006-02-18 07:03:24 UTC (rev 14112)
@@ -44,7 +44,7 @@
heap, instead of mmap/munmap. This is a tradeoff -- sbrk is faster than
mmap/munmap, and guarantees contiguous allocation, but is also less
flexible, and causes the heap to only be shrinkable from the end. */
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
# define MALLOC_USE_SBRK
#endif
Modified: trunk/uClibc/libc/stdlib/malloc-simple/alloc.c
===================================================================
--- trunk/uClibc/libc/stdlib/malloc-simple/alloc.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/stdlib/malloc-simple/alloc.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -36,7 +36,7 @@
#endif
}
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
# define MMAP_FLAGS MAP_PRIVATE | MAP_ANONYMOUS
#else
# define MMAP_FLAGS MAP_SHARED | MAP_ANONYMOUS
Modified: trunk/uClibc/libc/stdlib/malloc-standard/malloc.h
===================================================================
--- trunk/uClibc/libc/stdlib/malloc-standard/malloc.h 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/stdlib/malloc-standard/malloc.h 2006-02-18 07:03:24 UTC (rev 14112)
@@ -354,7 +354,7 @@
#define MAP_ANONYMOUS MAP_ANON
#endif
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
#define MMAP(addr, size, prot) \
(mmap((addr), (size), (prot), MAP_PRIVATE|MAP_ANONYMOUS, 0, 0))
Modified: trunk/uClibc/libc/sysdeps/linux/arm/crt1.S
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/arm/crt1.S 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/sysdeps/linux/arm/crt1.S 2006-02-18 07:03:24 UTC (rev 14112)
@@ -110,7 +110,7 @@
mov fp, #0
mov lr, #0
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
/* Pop argc off the stack and save a pointer to argv */
ldr a2, [sp], #4
mov a3, sp
Modified: trunk/uClibc/libc/sysdeps/linux/common/bits/posix_opt.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/bits/posix_opt.h 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/sysdeps/linux/common/bits/posix_opt.h 2006-02-18 07:03:24 UTC (rev 14112)
@@ -43,21 +43,21 @@
#define _POSIX_MAPPED_FILES 200112L
/* Locking of all memory is supported. */
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
# define _POSIX_MEMLOCK 200112L
#else
# undef _POSIX_MEMLOCK
#endif
/* Locking of ranges of memory is supported. */
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
# define _POSIX_MEMLOCK_RANGE 200112L
#else
# define _POSIX_MEMLOCK_RANGE
#endif
/* Setting of memory protections is supported. */
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
# define _POSIX_MEMORY_PROTECTION 1
#else
# undef _POSIX_MEMORY_PROTECTION
Modified: trunk/uClibc/libc/sysdeps/linux/common/fork.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/fork.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/sysdeps/linux/common/fork.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -10,7 +10,7 @@
#include "syscalls.h"
#include <unistd.h>
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
#ifdef __NR_fork
extern __typeof(fork) __libc_fork;
#define __NR___libc_fork __NR_fork
Modified: trunk/uClibc/libc/sysdeps/linux/common/ioperm.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/ioperm.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/sysdeps/linux/common/ioperm.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -8,7 +8,7 @@
*/
#include "syscalls.h"
-#if defined __ARCH_HAS_MMU__ && defined __NR_ioperm
+#if defined __ARCH_USE_MMU__ && defined __NR_ioperm
/* psm: can't #include <sys/io.h>, some archs miss it */
extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on) __THROW;
_syscall3(int, ioperm, unsigned long, from, unsigned long, num, int, turn_on);
Modified: trunk/uClibc/libc/sysdeps/linux/common/iopl.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/iopl.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/sysdeps/linux/common/iopl.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -8,7 +8,7 @@
*/
#include "syscalls.h"
-#if defined __ARCH_HAS_MMU__ && defined __NR_iopl
+#if defined __ARCH_USE_MMU__ && defined __NR_iopl
/* psm: can't #include <sys/io.h>, some archs miss it */
extern int iopl(int __level) __THROW;
_syscall1(int, iopl, int, level);
Modified: trunk/uClibc/libc/sysdeps/linux/common/mlock.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/mlock.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/sysdeps/linux/common/mlock.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -9,6 +9,6 @@
#include "syscalls.h"
#include <sys/mman.h>
-#if defined __ARCH_HAS_MMU__ && defined __NR_mlock
+#if defined __ARCH_USE_MMU__ && defined __NR_mlock
_syscall2(int, mlock, const void *, addr, size_t, len);
#endif
Modified: trunk/uClibc/libc/sysdeps/linux/common/mlockall.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/mlockall.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/sysdeps/linux/common/mlockall.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -9,6 +9,6 @@
#include "syscalls.h"
#include <sys/mman.h>
-#if defined __ARCH_HAS_MMU__ && defined __NR_mlockall
+#if defined __ARCH_USE_MMU__ && defined __NR_mlockall
_syscall1(int, mlockall, int, flags);
#endif
Modified: trunk/uClibc/libc/sysdeps/linux/common/munlock.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/munlock.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/sysdeps/linux/common/munlock.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -9,6 +9,6 @@
#include "syscalls.h"
#include <sys/mman.h>
-#if defined __ARCH_HAS_MMU__ && defined __NR_munlock
+#if defined __ARCH_USE_MMU__ && defined __NR_munlock
_syscall2(int, munlock, const void *, addr, size_t, len);
#endif
Modified: trunk/uClibc/libc/sysdeps/linux/common/munlockall.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/munlockall.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/sysdeps/linux/common/munlockall.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -9,6 +9,6 @@
#include "syscalls.h"
#include <sys/mman.h>
-#if defined __ARCH_HAS_MMU__
+#if defined __ARCH_USE_MMU__
_syscall0(int, munlockall);
#endif
Modified: trunk/uClibc/libc/unistd/Makefile.in
===================================================================
--- trunk/uClibc/libc/unistd/Makefile.in 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/unistd/Makefile.in 2006-02-18 07:03:24 UTC (rev 14112)
@@ -12,7 +12,7 @@
# multi source
CSRC := $(filter-out exec.c,$(CSRC))
-ifeq ($(ARCH_HAS_MMU),y)
+ifeq ($(ARCH_USE_MMU),y)
CSRC := $(filter-out __exec_alloc.c,$(CSRC))
else
CSRC := $(filter-out daemon.c,$(CSRC))
Modified: trunk/uClibc/libc/unistd/exec.c
===================================================================
--- trunk/uClibc/libc/unistd/exec.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libc/unistd/exec.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -53,7 +53,7 @@
libc_hidden_proto(__environ)
/**********************************************************************/
-#if defined(__ARCH_HAS_MMU__) || defined(__UCLIBC_UCLINUX_BROKEN_MUNMAP__)
+#if defined(__ARCH_USE_MMU__) || defined(__UCLIBC_UCLINUX_BROKEN_MUNMAP__)
/* We have an MMU, so use alloca() to grab space for buffers and
* arg lists. Also fall back to alloca() if munmap() is broken. */
Modified: trunk/uClibc/libpthread/linuxthreads/manager.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/manager.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libpthread/linuxthreads/manager.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -648,7 +648,7 @@
new_thread = (pthread_descr) stack_addr;
#endif
break;
-#ifndef __ARCH_HAS_MMU__
+#ifndef __ARCH_USE_MMU__
} else {
/* When there is MMU, mmap () is used to allocate the stack. If one
* segment is already mapped, we should continue to see if we can
Modified: trunk/uClibc/libpthread/linuxthreads.old/internals.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/internals.h 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libpthread/linuxthreads.old/internals.h 2006-02-18 07:03:24 UTC (rev 14112)
@@ -258,7 +258,7 @@
* the bounds a-priori. -StS */
extern char *__pthread_initial_thread_bos;
-#ifndef __ARCH_HAS_MMU__
+#ifndef __ARCH_USE_MMU__
extern char *__pthread_initial_thread_tos;
#define NOMMU_INITIAL_THREAD_BOUNDS(tos,bos) \
if ((tos)>=__pthread_initial_thread_bos \
@@ -266,7 +266,7 @@
__pthread_initial_thread_bos = (tos)+1
#else
#define NOMMU_INITIAL_THREAD_BOUNDS(tos,bos) /* empty */
-#endif /* __ARCH_HAS_MMU__ */
+#endif /* __ARCH_USE_MMU__ */
/* Indicate whether at least one thread has a user-defined stack (if 1),
@@ -330,7 +330,7 @@
THREAD_SELF implementation is used, this must be a power of two and
a multiple of PAGE_SIZE. */
#ifndef STACK_SIZE
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
#define STACK_SIZE (2 * 1024 * 1024)
#else
#define STACK_SIZE (4 * __pagesize)
@@ -387,7 +387,7 @@
return THREAD_SELF;
#else
char *sp = CURRENT_STACK_FRAME;
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
if (sp >= __pthread_initial_thread_bos)
return &__pthread_initial_thread;
else if (sp >= __pthread_manager_thread_bos
@@ -420,7 +420,7 @@
else {
return __pthread_find_self();
}
-#endif /* __ARCH_HAS_MMU__ */
+#endif /* __ARCH_USE_MMU__ */
#endif
}
Modified: trunk/uClibc/libpthread/linuxthreads.old/manager.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/manager.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libpthread/linuxthreads.old/manager.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -360,7 +360,7 @@
}
else
{
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
stacksize = STACK_SIZE - pagesize;
if (attr != NULL)
stacksize = MIN (stacksize, roundup(attr->__stacksize, pagesize));
@@ -450,7 +450,7 @@
/* on non-MMU systems we always have non-standard stack frames */
__pthread_nonstandard_stacks = 1;
-#endif /* __ARCH_HAS_MMU__ */
+#endif /* __ARCH_USE_MMU__ */
}
/* Clear the thread data structure. */
@@ -495,7 +495,7 @@
&new_thread, &new_thread_bottom,
&guardaddr, &guardsize) == 0)
break;
-#ifndef __ARCH_HAS_MMU__
+#ifndef __ARCH_USE_MMU__
else
/* When there is MMU, mmap () is used to allocate the stack. If one
* segment is already mapped, we should continue to see if we can
@@ -632,14 +632,14 @@
/* Free the stack if we allocated it */
if (attr == NULL || !attr->__stackaddr_set)
{
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_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 /* __ARCH_HAS_MMU__ */
+#endif /* __ARCH_USE_MMU__ */
}
__pthread_handles[sseg].h_descr = NULL;
__pthread_handles[sseg].h_bottom = NULL;
@@ -716,7 +716,7 @@
/* If initial thread, nothing to free */
if (th == &__pthread_initial_thread) return;
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
if (!th->p_userstack)
{
/* Free the stack and thread descriptor area */
@@ -729,7 +729,7 @@
if (!th->p_userstack) {
free(h_bottom_save);
}
-#endif /* __ARCH_HAS_MMU__ */
+#endif /* __ARCH_USE_MMU__ */
}
/* Handle threads that have exited */
Modified: trunk/uClibc/libpthread/linuxthreads.old/ptfork.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/ptfork.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libpthread/linuxthreads.old/ptfork.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -18,7 +18,7 @@
#include <errno.h>
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
#include <stddef.h>
#include <stdlib.h>
Modified: trunk/uClibc/libpthread/linuxthreads.old/pthread.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/pthread.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libpthread/linuxthreads.old/pthread.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -172,9 +172,9 @@
* This is adapted when other stacks are malloc'ed since we don't know
* the bounds a-priori. -StS */
-#ifndef __ARCH_HAS_MMU__
+#ifndef __ARCH_USE_MMU__
char *__pthread_initial_thread_tos = NULL;
-#endif /* __ARCH_HAS_MMU__ */
+#endif /* __ARCH_USE_MMU__ */
/* File descriptor for sending requests to the thread manager. */
/* Initially -1, meaning that the thread manager is not running. */
@@ -363,7 +363,7 @@
{
struct sigaction sa;
sigset_t mask;
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
struct rlimit limit;
rlim_t max_stack;
#endif
@@ -410,7 +410,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 __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_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);
@@ -429,7 +429,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 /* __ARCH_HAS_MMU__ */
+#endif /* __ARCH_USE_MMU__ */
/* Setup signal handlers for the initial thread.
Since signal handlers are shared between threads, these settings
Modified: trunk/uClibc/libutil/Makefile.in
===================================================================
--- trunk/uClibc/libutil/Makefile.in 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/libutil/Makefile.in 2006-02-18 07:03:24 UTC (rev 14112)
@@ -17,7 +17,7 @@
libutil_OUT := $(top_builddir)libutil
libutil_SRC := $(wildcard $(libutil_DIR)/*.c)
-ifneq ($(ARCH_HAS_MMU),y)
+ifneq ($(ARCH_USE_MMU),y)
libutil_SRC := $(filter-out $(libutil_DIR)/forkpty.c,$(libutil_SRC))
endif
libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
Modified: trunk/uClibc/test/test-skeleton.c
===================================================================
--- trunk/uClibc/test/test-skeleton.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/test/test-skeleton.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -193,7 +193,7 @@
int
main (int argc, char *argv[])
{
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
int direct = 0; /* Directly call the test function? */
#else
int direct = 1;
Modified: trunk/uClibc/test/unistd/fork.c
===================================================================
--- trunk/uClibc/test/unistd/fork.c 2006-02-18 06:53:43 UTC (rev 14111)
+++ trunk/uClibc/test/unistd/fork.c 2006-02-18 07:03:24 UTC (rev 14112)
@@ -32,7 +32,7 @@
#define GOT2 (1 << 2)
#define GOT3 (1 << 3)
-#ifdef __ARCH_HAS_MMU__
+#ifdef __ARCH_USE_MMU__
void child_handler(int sig)
{
More information about the uClibc-cvs
mailing list