acadia-newlib/newlib/libc/include
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
..
machine Provide __intmax_t and __uintmax_t 2016-10-25 16:24:05 +02:00
rpc
sys Allow locking routine to be retargeted 2017-02-13 17:07:11 -05:00
_ansi.h
_newlib_version.h Fix _newlib_version.h logic to support building gcc with newlib. 2016-02-25 15:04:19 -05:00
_syslist.h
alloca.h
ar.h
argz.h
assert.h
complex.h Add missing long double functions to Cygwin 2016-03-29 14:43:55 +02:00
cpio.h Add cpio.h 2016-04-04 10:25:27 -05:00
ctype.h Constify __locale_ctype_ptr and __locale_ctype_ptr_l 2016-08-17 09:40:28 +02:00
devctl.h devctl.h: Fix typo and include proper header 2017-01-25 12:37:19 +01:00
dirent.h Feature test macros overhaul: dirent.h 2016-03-17 21:08:51 -05:00
envlock.h
envz.h
errno.h
fastmath.h
fcntl.h
fnmatch.h Feature test macros overhaul: fnmatch.h 2016-03-17 21:08:54 -05:00
getopt.h
glob.h
grp.h Feature test macros overhaul: grp.h 2016-03-17 21:08:56 -05:00
iconv.h
ieeefp.h math: guard BSD finite/isinf/isnan functions properly in math.h 2016-04-04 14:13:21 -05:00
inttypes.h
langinfo.h nl_langinfo: Add NL_LOCALE_NAME macro 2017-01-20 10:30:47 +01:00
libgen.h
limits.h Feature test macros overhaul: limits.h 2016-03-17 21:08:57 -05:00
locale.h Change return type from locale_t to struct __locale_t * as well 2016-08-25 17:27:37 +02:00
malloc.h
math.h math.h: fix guards on basic M_ constants 2016-07-15 09:06:53 -05:00
memory.h Provide <memory.h> 2016-11-22 14:21:35 +01:00
newlib.h
paths.h
pthread.h Add pthread_setname_np() and pthread_getname_np() 2017-01-09 16:19:58 +01:00
pwd.h Feature test macros overhaul: pwd.h 2016-03-17 21:09:01 -05:00
reent.h Eliminate use of Newlib-specific <machine/types.h> 2016-04-13 13:30:27 +02:00
regdef.h
regex.h
sched.h
search.h
setjmp.h
signal.h Feature test macros overhaul: signal.h 2016-03-17 21:09:03 -05:00
spawn.h
stdatomic.h
stdint.h Provide __intmax_t and __uintmax_t 2016-10-25 16:24:05 +02:00
stdio.h Define va_list in stdio.h and wchar.h 2016-08-12 11:43:14 -05:00
stdio_ext.h
stdlib.h Implement strto[dflu]_l/wcsto[dflu]_l 2016-08-15 17:35:21 +02:00
string.h Add strerror_l prototype, change str[n]casecmp_l feature tests 2016-08-25 09:44:31 +02:00
strings.h Add strerror_l prototype, change str[n]casecmp_l feature tests 2016-08-25 09:44:31 +02:00
tar.h Feature test macros overhaul: tar.h 2016-04-04 10:25:29 -05:00
termios.h
tgmath.h Add missing long double functions to Cygwin 2016-03-29 14:43:55 +02:00
threads.h
time.h Implement GNU extension strptime_l 2016-08-23 17:51:14 +02:00
unctrl.h
unistd.h
utime.h
utmp.h
wchar.h Implement GNU extension wcsftime_l 2016-08-23 17:51:14 +02:00
wctype.h Add sys/_locale.h header and fix up headers 2016-08-15 10:56:58 +02:00
wordexp.h