This is the mail archive of the
mailing list for the newlib project.
Re: [patch] New option --disable-reenterable-atexit
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: Ye Joey <joey dot ye dot cc at gmail dot com>
- Cc: newlib at sourceware dot org
- Date: Wed, 16 Oct 2013 14:34:07 +0200
- Subject: Re: [patch] New option --disable-reenterable-atexit
- Authentication-results: sourceware.org; auth=none
- References: <000001ceca3a$675f0f00$361d2d00$ at arm dot com> <525E4F99 dot 5000803 at embedded-brains dot de> <CAL0py27pZmT21oit6K1Mz9Dbpzp+_yyLLZBBCofW9Gp5TCxVVA at mail dot gmail dot com>
On 2013-10-16 12:18, Ye Joey wrote:
On Wed, Oct 16, 2013 at 4:34 PM, Sebastian Huber
+ 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
I named it to mean that atexit isn't in _reent. But _reent isn't a
good name as option as it is implementation specific data structure
How about --enable-global-atexit-data, and changes the description accordingly?
Yes, I think this name describes it better.
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 : email@example.com
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.