acadia-newlib/newlib/libc
Thomas Preud'homme bd54749095 Allow locking routine to be retargeted
At the moment when targeting bare-metal targets or systems without
definition for the locking primitives newlib, uses dummy empty macros.
This has the advantage of reduced size and faster implementation but
does not allow the application to retarget the locking routines.
Retargeting is useful for a single toolchain to support multiple systems
since then it's only at link time that you know which system you are
targeting.

This patch adds a new configure option
--enable-newlib-retargetable-locking to use dummy empty functions
instead of dummy empty macros. The default is to keep the current
behavior to not have any size or speed impact on targets not interested
in this feature. To allow for any size of lock, the _LOCK_T type is
changed into pointer to struct _lock and the _init function are tasked
with allocating the locks. The platform being targeted must provide the
static locks. A dummy implementation of the locking routines and static
lock is provided for single-threaded applications to link successfully
out of the box.

To ensure that the behavior is consistent (either no locking whatsoever
or working locking), the dummy implementation is strongly defined such
that a partial retargeting will cause a doubly defined link error.
Indeed, the linker will only pull in the file providing the dummy
implementation if it cannot find an implementation for one of the
routine or lock.
2017-02-13 17:07:11 -05:00
..
argz Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
ctype Bump release to 2.5.0 for yearly snapshot. 2016-12-22 21:33:54 -05:00
errno Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
iconv Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
include Allow locking routine to be retargeted 2017-02-13 17:07:11 -05:00
locale nl_langinfo: Add NL_LOCALE_NAME macro 2017-01-20 10:30:47 +01:00
machine arm: Fix addressing in optpld macro 2017-01-26 16:29:36 +01:00
misc Allow locking routine to be retargeted 2017-02-13 17:07:11 -05:00
posix Only define static locks in multithreaded mode 2017-02-13 17:04:17 -05:00
reent Revert "Fix __getreent function for Cygwin" 2016-08-18 15:24:18 +02:00
search Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
signal Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
stdio Unify names of all lock objects 2017-02-06 16:55:09 -05:00
stdio64 Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
stdlib Only define static locks in multithreaded mode 2017-02-13 17:04:17 -05:00
string Add missing headers to fix implicit function defns 2017-01-16 10:14:28 +01:00
sys RTEMS: Harmonize MAXNAMLEN and NAME_MAX 2017-01-25 12:36:37 +01:00
syscalls Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
time Unify names of all lock objects 2017-02-06 16:55:09 -05:00
unix Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
xdr Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
Makefile.am Make newlib manpages (v3) 2016-07-04 14:17:10 +01:00
Makefile.in Bump release to 2.5.0 for yearly snapshot. 2016-12-22 21:33:54 -05:00
aclocal.m4 Fix up errors in regenerated files for 2.3.0 release. 2016-01-04 12:57:31 -05:00
configure Allow locking routine to be retargeted 2017-02-13 17:07:11 -05:00
configure.in Allow locking routine to be retargeted 2017-02-13 17:07:11 -05:00
libc.in.xml Make newlib manpages (v3) 2016-07-04 14:17:10 +01:00
libc.texinfo Fix versions in documentation (manually for now) 2017-01-09 16:22:02 +01:00
saber
sys.tex Don't include stdio64 functions in reentrant syscalls menu when not bulding stdio64. 2015-08-03 09:54:33 +01:00