This is the mail archive of the mailing list for the newlib project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] New option --disable-reenterable-atexit

On 2013-10-16 08:39, Joey Ye wrote:
There is an existing macro to declare atexit data structure as global
variables, so that it can be discarded if not used to save memory
consumption. But this macro was only enabled for certain targets.

This patch adds an configure option --disable-reenterable-atexit for more

2013-10-16  Joey Ye<> (disable-reenterable-atexit): New option.
	configure: Regenerated.
	newlib.hin (_REENT_GLOBAL_ATEXIT): Place-holder.
	README (disable-reenterable-atexit): Description for
	new option.


diff --git a/newlib/README b/newlib/README
index a8aba99..9b2d5b0 100644
--- a/newlib/README
+++ b/newlib/README
@@ -288,6 +288,12 @@ One feature can be enabled by specifying `--enable-FEATURE=yes' or
       Disable dynamic allocation of atexit entries.
       Most hosts and targets have it enabled in

+     Disable reenterablility of atexit by declare related data structures
+     as global variables. By doing these data structures can be discarded
+     if atexit is not referenced.
+     Enabled by default.

I think the naming and the description is a bit misleading. The atexit() support is not thread specific. Operations are serialized with the __atexit_lock lock. In case _REENT_GLOBAL_ATEXIT is undefined, then the data structures for the atexit() support are part of struct _reent, but only used in _GLOBAL_REENT. Thus the space in the thread specific structures is wasted. See also

Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  :
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]