summaryrefslogtreecommitdiffstats
path: root/newlib/libc/sys/rtems/include
Commit message (Collapse)AuthorAgeFilesLines
* Add _Thread_queue_Queue::_owner for RTEMSJeff Johnston2016-05-031-3/+3
| | | | | | | | Add _Thread_queue_Queue::_owner which will be used for the upcomming priority inheritance implementation and an O(m) independence-preserving protocol (OMIP) implementation. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Move _Thread_queue_Queue::_Lock for RTEMSJeff Johnston2016-05-031-3/+3
| | | | | | | | | | Move _Thread_queue_Queue::_Lock to begin of the structure. On RTEMS, the presence of a lock component in the thread queue structures actually depends on the build-time RTEMS_SMP configuration option. A move of this part to the begin of the structure allows an implementation re-use for the other parts. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Provide FreeBSD types for <sys/types.h> on RTEMScygwin-2_5_1-releaseSebastian Huber2016-04-212-0/+80
| | | | | | | | | | | | | | | | | | | | Provide the following types via <sys/types.h> on RTEMS for FreeBSD compatibility if __BSD_VISIBLE * accmode_t, * cap_rights_t, * c_caddr_t, * cpulevel_t, * fixpt_t, * lwpid_t, * uintfptr_t, * vm_offset_t, * vm_ooffset_t, * vm_paddr_t, * vm_pindex_t, and * vm_size_t. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add RTEMS support for GCC libatomicSebastian Huber2016-04-201-0/+46
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add RTEMS-specific types for BSD compatibilitySebastian Huber2016-04-191-0/+6
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Provide POSIX defined blksize_t in <sys/types.h>Sebastian Huber2016-04-151-2/+3
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Provide POSIX defined blkcnt_t in <sys/types.h>Sebastian Huber2016-04-151-1/+3
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Define mode_t via __mode_tSebastian Huber2016-04-151-1/+1
| | | | | | Use __uint32_t to avoid the use of GCC-specific _ST_INT32. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add BSD guard for ino_t in <sys/types.h>Sebastian Huber2016-04-151-0/+3
| | | | | | Introduce internal type __ino_t. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Use __machine_*_t_defined for internal typesSebastian Huber2016-04-151-24/+14
| | | | | | | | | | | | | | | | | | | | | | Newlib defines defaults for internal types via <sys/_types.h> and uses <machine/_types.h> to let targets define their own type if necessary. Previously for example #ifndef __dev_t_defined typedef short __dev_t; #endif However, the __*_t_defined pattern conflicts with the glibc type guard pattern for user types, e.g. dev_t in this example. Introduce a __machine_*_t_defined pattern for internal types (defined by <machine/_types.h>, used by <sys/_types.h>). For example #ifndef __machine_dev_t_defined typedef short __dev_t; #endif Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Eliminate use of Newlib-specific <machine/types.h>Sebastian Huber2016-04-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change solves a glibc/BSD compatibility problem. glibc and BSD use double underscore types for internal types. The Linux port of Newlib uses some glibc provided internal type definitions which are not protected by guard defines, e.g. __off_t. To avoid a conflict Newlib uses single underscore types for some internal types, e.g. _off_t. However, for BSD compatibility we have to define the internal types with double underscore names in <sys/_types.h>. The header file <machine/types.h> is Newlib-specific. It was used instead of <sys/_types.h> to provide the internal type definitions _CLOCK_T, _TIME_T_, _CLOCKID_T_, _TIMER_T_, and __suseconds_t. Move these definitions to <sys/_types.h> (there exist two instances of this file, one for Linux and one for all other targets). This makes the _HAVE_SYSTYPES configuration define obsolete (could possibly break the __RDOS__ target). Use the standard <sys/_types.h> include throughout. Move __loff_t defintion to default (non-Linux) <sys/_types.h>. Define it via _off64_t to avoid a dependency on the compiler. Provide the __off_t definition via default (non-Linux) <sys/_types.h> based on _off_t for all systems except Cygwin. For Cygwin use _off64_t. Define off_t via __off_t. Provide the __pid_t definition via default (non-Linux) <sys/_types.h>. This prevents a potential __pid_t and pid_t incompatibility. Add BSD guard defines for pid_t. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Move kernel dependent parts of <sys/time.h>cygwin-2_5_0-releaseSebastian Huber2016-04-081-0/+199
| | | | | | | | Move the kernel dependent parts of <sys/time.h> to new system-specific header file <machine/_time.h>. Provide an empty default implementation. Add a specialized implementation for RTEMS. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Drop <unistd.h> include from RTEMS <sys/param.h>Sebastian Huber2016-04-071-2/+0
| | | | | | | | This include is not present in default Newlib, glibc and FreeBSD <sys/param.h>. With it there is now a conflict with <sys/libkern.h> introduced by ecf453f9635fb278cff4d4bae21a1e249313b817. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add arc4random() etc. from OpenBSD 5.8Sebastian Huber2016-03-181-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | According to the OpenBSD man page, "A Replacement Call for Random". It offers high quality random numbers derived from input data obtained by the OpenBSD specific getentropy() system call which is declared in <unistd.h> and must be implemented for each Newlib port externally. The arc4random() functions are used for example in LibreSSL and OpenSSH. Cygwin provides currently its own implementation of the arc4random family. Maybe it makes sense to use this getentropy() implementation: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libcrypto/crypto/getentropy_win.c?rev=1.4&content-type=text/x-cvsweb-markup * libc/include/stdlib.h (arc4random): Declare if __BSD_VISIBLE. (arc4random_buf): Likewise. (arc4random_uniform): Likewise. * libc/include/sys/unistd.h (getentropy): Likewise. * libc/include/machine/_arc4random.h: New file. * libc/stdlib/arc4random.c: Likewise. * libc/stdlib/arc4random.h: Likewise. * libc/stdlib/arc4random_uniform.c: Likewise. * libc/stdlib/chacha_private.h: Likewise. * libc/sys/rtems/include/machine/_arc4random.h: Likewise. * libc/stdlib/Makefile.am (EXTENDED_SOURCES): Add arc4random.c and arc4random_uniform.c. * libc/stdlib/Makefile.in: Regenerate.
* Add definitions for NBBY to arm and rtems targetsNick Withers2015-12-071-0/+1
| | | | | | | * libc/sys/arm/sys/param.h (NBBY): Define if not already defined. * libc/sys/rtems/include/sys/param.h (NBBY): Define. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Import <threads.h> from latest FreeBSD.Jeff Johnston2015-10-131-0/+54
| | | | | | | | - Move types and defines to <machine/_threads.h> so that it can be customized per target. * libc/include/threads.h: New. * libc/sys/rtems/include/machine/_threads.h: Likewise.
* Fix typo in <sys/lock.h>Sebastian Huber2015-07-311-1/+1
| | | | | | | | | | | Sorry, there was a typo in <sys/lock.h> which leads to memory corruption since not enough space is reserved for the lock object. newlib/ChangeLog 2015-07-30 Sebastian Huber <sebastian.huber@embedded-brains.de> * libc/sys/rtems/include/sys/lock.h (__LOCK_INIT_RECURSIVE): Use proper type.
* Move header filesSebastian Huber2015-07-298-0/+834
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | During libgcc build the first include search path for <...> is "../newlib/libc/sys/rtems/include". Move all RTEMS specific header files to "libc/sys/rtems/include" so that they can be found. Later during libc build the header files in the previous location were somehow present, but for libgcc build they were invisible. This change is necessary to use <pthread.h> for the GCC thread model implementation. newlib/ChangeLog 2015-07-27 Sebastian Huber <sebastian.huber@embedded-brains.de> libc/sys/rtems/machine/_types.h: Move to ... libc/sys/rtems/include/machine/_types.h: ... here. libc/sys/rtems/machine/limits.h: Move to ... libc/sys/rtems/include/machine/limits.h: ... here. libc/sys/rtems/machine/param.h: Move to ... libc/sys/rtems/include/machine/param.h: ... here. libc/sys/rtems/sys/cpuset.h: Move to ... libc/sys/rtems/include/sys/cpuset.h: ... here. libc/sys/rtems/sys/dirent.h: Move to ... libc/sys/rtems/include/sys/dirent.h: ... here. libc/sys/rtems/sys/param.h: Move to ... libc/sys/rtems/include/sys/param.h: ... here. libc/sys/rtems/sys/syslimits.h: Move to ... libc/sys/rtems/include/sys/syslimits.h: ... here. libc/sys/rtems/sys/utime.h: Move to ... libc/sys/rtems/include/sys/utime.h: ... here.
* Add <sys/lock.h>Sebastian Huber2015-07-291-0/+235
| | | | | | | | | | | | | | | | | | | | | | | | Provide self-contained synchronization objects for RTEMS. The API was designed to be able to use it for the Newlib internal locks, the C11 threads support, the GCC thread model support and the libgomp operating system configuration in combination with <pthread.h>. References: https://lists.rtems.org/pipermail/devel/2015-July/011989.html https://lists.rtems.org/pipermail/devel/2015-July/012000.html Tickets: https://devel.rtems.org/ticket/1247 https://devel.rtems.org/ticket/2274. v2: Fix typo in _Condition_Wait_recursive_timed() declaration. newlib/ChangeLog 2015-07-28 Sebastian Huber <sebastian.huber@embedded-brains.de> * libc/sys/rtems/include/sys/lock.h: New.
* Import libc/sys/rtems/include/semaphore.h from FreeBSD.Sebastian Huber2015-03-121-0/+56
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * libc/sys/rtems/include/limits.h: Update page size to matchCorinna Vinschen2013-12-101-1/+1
| | | | libc/sys/rtems/machine/param.h.
* 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2013-10-151-0/+1
| | | | | | | * libc/sys/rtems/machine/_types.h (__dev_t): Define. (__dev_t_defined) Likewise. * libc/include/sys/_types.h (__dev_t): Delete RTEMS specific definition.
* 2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-08-231-0/+6
| | | | | * libc/sys/rtems/include/limits.h: Compute SSIZE_MAX based on __SIZE_MAX__, __SIZEOF_SIZE_T__ and __CHAR_BIT__.
* 2008-11-17 Joel Sherrill <joel.sherrill@oarcorp.com>Jeff Johnston2008-11-171-0/+3
| | | | | * sys/rtems/include/limits.h: Add _POSIX2_RE_DUP_MAX. * sys/rtems/sys/param.h: sys/rtprio.h not needed.
* 2005-09-20 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2005-09-201-288/+0
| | | | | * libc/sys/rtems/include/inttypes.h: Moved to... * libc/include/inttypes.h: ...here.
* 2005-09-19 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2005-09-191-282/+0
| | | | | * libc/sys/rtems/include/stdint.h: Moved to... * libc/include/stdint.h: ...here.
* 2005-03-06 Ralf Corsepious <ralf.corsepius@rtems.org>Jeff Johnston2005-03-062-0/+570
| | | | | * libc/sys/rtems/include/inttypes.h: New file. * libc/sys/rtems/include/stdint.h: Ditto.
* 2003-01-16 Joel Sherrill <joel@OARcorp.com>Jeff Johnston2003-01-161-14/+2
| | | | | | | | | | | * libc/sys/rtems/include/limits.h, libc/sys/rtems/sys/param.h, libc/sys/rtems/sys/syslimits.h: Update to be in sync with what constants are defined in each file in the shared versions in libc/include. * libc/sys/rtems/crt0.c: Define extra symbols on SH and HP-PA to autoconf can link programs. * libc/include/machine/types.h: Explicitly specify signed on intXX_t types to ensure they are signed.
* 2000-12-11 Joel Sherrill <joel@OARcorp.com>Jeff Johnston2000-12-122-360/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Merge RTEMS specific .h files into main libc/include. * libc/sys/rtems/include/signal.h: Removed. * libc/sys/rtems/include/time.h: Removed. * libc/sys/rtems/sys/features.h: Removed. * libc/sys/rtems/sys/sched.h: Removed. * libc/sys/rtems/sys/siginfo.h: Removed. * libc/sys/rtems/sys/signal.h: Removed. * libc/sys/rtems/sys/time.h: Removed. * libc/sys/rtems/sys/times.h: Removed. definitions for time_t and clock_t since these are no longer in time.h. * libc/include/pthread.h: New file. * libc/include/sys/sched.h: New file. * libc/include/sys/features.h: New file. * libc/include/time.h: Removed duplicate definition of clock_t and time_t, get them from <sys/types.h> instead. Add prototypes for POSIX clock and timer functionality. * libc/sys/linux/sys/types.h: Changed to include * libc/include/machine/types.h: Add _CLOCKID_T_ and _TIMER_T_. * libc/include/sys/signal.h: Add more complete set of POSIX signal functionality including real-time and threaded signals. * libc/include/sys/types.h: Add clock_t, time_t, struct timespec, and struct itimerspec. Centralizing these makes things cleaner. RTEMS uses 64-bit dev_t. Added numerous primitive definitions for pthreads including macros, pthread_attr_t, pthread_mutexattr_t, pthread_condattr_t, pthread_key_t, pthread_once_t, and pthread_t. * libc/include/sys/unistd.h: Added getlogin_r() prototype. If RTEMS follow POSIX on read(), write() and sbrk() prototype. Feature flags removed and moved to new file <sys/features.h>. Full set of POSIX sysconf() constants
* import newlib-2000-02-17 snapshotChristopher Faylor2000-02-173-0/+538