[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GSOC:disable newlibc reentrancy
- Date: Thu, 8 May 2008 14:54:26 +0800
- From: yanmiaobest at gmail.com (阎淼)
- Subject: GSOC:disable newlibc reentrancy
Hi,
I am trying to disable newlibc.c reentrant support. And Our goal is to
defer as many things as possible to link time. To that end, newlibc.c
should be splitted. bsp_libc_init(in bsppost.c) calls libc_init, which
is defined in newlibc.c(in libcsupport directory). There are also some
libc reentrant hooks defined in newlibc.c plus the libc_global_reent
variable. So I create a new file newlibc_init.c in
cpukit/libcsupport/src(of course need to modify the Makefile), which
has only one function(libc_init, copied from newlibc.c), and a
variable definition(libc_global_reent copied from newlibc.c), and I
also move the definition of RTEMS_NEWLIB_EXTENSION to confdefs.h,
wrapped by CONFIGURE_DISABLE_NEWLIB_REENTRANCY macro. If you do not
want newlibc reentrancy support, you define macro
CONFIGURE_DISABLE_NWELIB_REENTRANCY in your application configuration
file as before, and libc reentrant hooks will no be linked; If you
need newlibc reentrancy code, you do nothing. Is that OK?