acadia-newlib/newlib/libc/include/sys
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
..
_default_fcntl.h Provide FNONBLOCK for BSD compatiblity 2016-04-15 14:51:40 +02:00
_intsup.h Provide __intmax_t and __uintmax_t 2016-10-25 16:24:05 +02:00
_locale.h Add sys/_locale.h header and fix up headers 2016-08-15 10:56:58 +02:00
_pthreadtypes.h Move pthread types to <sys/_pthreadtypes.h> 2016-11-17 11:33:15 +01:00
_sigset.h FreeBSD compatibility for <sys/select.h> 2015-12-14 15:39:44 +01:00
_stdint.h Provide __intmax_t and __uintmax_t 2016-10-25 16:24:05 +02:00
_timespec.h Add BSD guard for time_t 2016-04-15 14:51:39 +02:00
_timeval.h Add BSD guard for time_t 2016-04-15 14:51:39 +02:00
_types.h Fix off_t typedef on Cygwin64 2016-08-29 15:30:59 -05:00
cdefs.h sys/cdefs.h: Define __hidden as empty on Cygwin 2016-11-08 16:14:43 +01:00
config.h Eliminate use of Newlib-specific <machine/types.h> 2016-04-13 13:30:27 +02:00
custom_file.h 2007-02-01 Joel Schopp <jschopp@austin.ibm.com> 2007-02-01 16:33:05 +00:00
dir.h * libc/include/sys/dir.h: New BSD-compatibility header. 2010-08-11 18:14:54 +00:00
dirent.h 2005-10-04 James E Wilson <wilson@specifix.com> 2005-10-04 20:47:39 +00:00
errno.h * libc/include/sys/errno.h: Fix comments. 2014-07-14 13:40:17 +00:00
fcntl.h 2007-11-15 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 18:49:17 +00:00
features.h Add _POSIX_SHARED_MEMORY_OBJECTS 2017-01-13 13:07:40 -06:00
file.h import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
iconvnls.h 2004-09-13 Artem B. Bityuckiy <dedekind@oktetlabs.ru> 2004-09-13 17:10:20 +00:00
lock.h Allow locking routine to be retargeted 2017-02-13 17:07:11 -05:00
param.h Move fd_stuff from sys/types.h to sys/select.h 2015-12-07 16:28:22 +01:00
queue.h * libc/sys/rtems/sys/queue.h: Delete file. 2013-04-16 10:25:16 +00:00
reent.h Fix sys/reent.h to remove use of DEBUG flag. 2017-01-10 12:19:03 -05:00
resource.h 2014-11-23 Joel Sherrill <joel.sherrill@oarcorp.com> 2014-11-24 14:12:32 +00:00
sched.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
select.h Feature test macros overhaul: sys/select.h 2016-03-17 21:09:15 -05:00
signal.h Resurrect <machine/types.h> for <sys/types.h> 2016-04-21 10:08:19 +02:00
stat.h Provide POSIX defined blksize_t in <sys/types.h> 2016-04-15 14:51:40 +02:00
stdio.h * libc/include/sys/stdio.h (_flockfile, _funlockfile): Fix typos. 2009-01-08 00:01:33 +00:00
string.h 2005-01-24 Jeff Johnston <jjohnstn@redhat.com> 2005-01-24 18:46:09 +00:00
syslimits.h * libc/include/langinfo.h: New file. 2002-08-23 01:56:05 +00:00
time.h sys/time.h: Change visibility of gettimeofday. 2016-06-20 10:11:24 +02:00
timeb.h Add BSD guard for time_t 2016-04-15 14:51:39 +02:00
times.h Add BSD guard for clock_t 2016-04-15 14:51:39 +02:00
timespec.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
tree.h Import <sys/tree.h> from FreeBSD 2015-04-23 21:57:06 +02:00
types.h Move pthread types to <sys/_pthreadtypes.h> 2016-11-17 11:33:15 +01:00
unistd.h Add <devctl.h> per POSIX 1003.26-2003 2016-12-05 21:00:38 -06:00
utime.h import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
wait.h Fix comment in sys/wait.h 2015-05-28 16:40:43 +02:00