Commit Graph

369 Commits

Author SHA1 Message Date
Sebastian Huber
50552818d7 Delete unused declarations and define 2015-11-27 07:25:01 +01:00
Sebastian Huber
443c61ec94 Delete empty libc_init() 2015-11-27 07:24:51 +01:00
Sebastian Huber
8f3ec7c0d9 Import latest <sys/ttycom.h> from FreeBSD
Required by new network stack.
2015-11-17 15:22:18 +01:00
Sebastian Huber
f757bb7c4b Merge with latest <sys/sockio.h> from FreeBSD
Required by new network stack.
2015-11-17 15:12:34 +01:00
Sebastian Huber
836803f72a Import latest <sys/filio.h> from FreeBSD
Required by new network stack.
2015-11-17 14:57:47 +01:00
Sebastian Huber
143696acbd basedefs.h: Add and use RTEMS_NO_RETURN 2015-10-26 09:13:19 +01:00
Joel Sherrill
1aa7b8beb1 Move contents of libcsupport/include/zilog into libbsp/shared
Only a few BSPs use this and it should not have been in libcsupport.
2015-03-09 16:15:14 -05:00
Joel Sherrill
6796d9cd69 Remove unused cpukit/libcsupport/include/zilog/z8536.h 2015-03-09 16:15:14 -05:00
Joel Sherrill
5bc6237a36 Move libcsupport/include/motorola/*.h to m68k/idp BSP
These header files were only used by one BSP and they are
hardware dependent. The hardware dependency always made
them bad candidates for where they were in the tree. But
this fixes that.
2015-03-09 16:15:14 -05:00
Joel Sherrill
a7e4de2504 Fix even more Doxygen issues 2015-03-06 14:33:08 -06:00
Sebastian Huber
353506b93e sys/event.h: Update to FreeBSD 9.3 2015-02-13 10:48:35 +01:00
Sebastian Huber
eb7753437f Filesystem: Delete unused fsmountme_h handler 2015-02-09 15:38:48 +01:00
Sebastian Huber
4c14ace6dd Add rtems_filesystem_make_dev_t_from_pointer() 2015-02-04 19:31:52 +01:00
Sebastian Huber
efd2965abf Filesystem: Statically initialize rtems_libio_iops 2015-02-04 14:03:49 +01:00
Sebastian Huber
ec0f2df19b Filesystem: Use rtems_libio_iop_to_descriptor()
Drop parameter check from previously unused
rtems_libio_iop_to_descriptor().
2015-02-04 14:03:49 +01:00
Sebastian Huber
97db9e3030 Filesystem: Delete rtems_libio_last_iop 2015-02-04 14:03:49 +01:00
Sebastian Huber
ead010cd3c Filesystem: Make rtems_libio_number_iops const 2015-02-04 14:03:49 +01:00
Sebastian Huber
c625a64121 Filesystem: Delete node type operation
Use the fstat handler instead.
2015-01-22 07:52:40 +01:00
Sebastian Huber
7bdb765a67 Add POSIX key value pairs to resource snapshot 2014-12-12 13:16:28 +01:00
Sebastian Huber
01557b0c6e libcsupport: Delete malloc statistics
Use the heap handler statistics instead.  Add heap walk option to MALLOC
shell command.

close #1367
2014-11-28 11:23:53 +01:00
Sebastian Huber
b8bd90f68f Add supplementary groups to user environment 2014-11-20 10:30:23 +01:00
Sebastian Huber
c3350e7d4a Filesystem: Typo 2014-11-20 10:30:22 +01:00
Joel Sherrill
65f71f8472 libcsupport/include/clockdrv.h: Remove rtems_clock_major/minor 2014-10-13 10:33:32 -05:00
Sebastian Huber
7fd5e89c96 termios: Partially hide rtems_termios_tty
Move interrupt lock to device context and expose only this structure to
the read, write and set attributes device handler.  This makes these
device handler independent of the general Termios infrastructure
suitable for direct use in printk() support.
2014-10-07 16:35:13 +02:00
Sebastian Huber
a830cb864d termios: Separate flow control from normal handler 2014-10-07 16:27:51 +02:00
Joel Sherrill
f535fe5311 tod.h -> libcsupport like other driver and helper prototype files
This rippled into the handful of files that should have been using
<rtems/tod.h>.
2014-09-16 16:09:13 -05:00
Joel Sherrill
8fbe2e69b5 Use correct prototype of benchmark_timer_read()
This change starts with removing the effectively empty file
timerdrv.h. The prototypes for benchmark_timer_XXX() were in
btimer.h which was not universally used. Thus every use of
timerdrv.h had to be changed to btimer.h. Then the prototypes
for benchmark_timer_read() had to be adjusted to return
benchmark_timer_t rather than int or uint32_t.

I took this opportunity to also correct the file headers to
separate the copyright from the file description comments which
is needed to ensure the copyright isn't propagated into Doxygen
output.
2014-09-16 16:09:12 -05:00
Sebastian Huber
93726e5205 termios: Add rtems_termios_set_best_baud() 2014-07-09 15:56:43 +02:00
Christian Mauderer
8074342c9b termios: Add rtems_termios_get_termios() 2014-07-09 13:33:06 +02:00
Sebastian Huber
ef8c00bc88 termios: PR2153: New low-level device API
Add a new low-level device API to Termios that passes the TTY structure
to the low-level device functions.  This greatly simplifies the
low-level device drivers since they are no longer forced to derive their
private data from the minor number.

It makes it possible to use the TTY low-level lock in the device driver
low-level functions which is necessary for proper SMP support.  For
example to set the attributes it is often necessary to perform a
read-modify-write operation on a control register used also by interrupt
routines.

A compatibility layer is provided to support device drivers using the
old callback functions so it is not necessary to modify existing device
drivers.
2014-07-09 11:55:00 +02:00
Sebastian Huber
69aa33490b score: Simplify thread control initialization
The thread control block contains fields that point to application
configuration dependent memory areas, like the scheduler information,
the API control blocks, the user extension context table, the RTEMS
notepads and the Newlib re-entrancy support.  Account for these areas in
the configuration and avoid extra workspace allocations for these areas.

This helps also to avoid heap fragementation and reduces the per thread
memory due to a reduced heap allocation overhead.
2014-04-15 08:37:12 +02:00
Sebastian Huber
25a978354c ringbuf: Fix ISR lock initialization/destruction 2014-04-01 14:10:22 +02:00
Sebastian Huber
1b1be254e7 score: Thread life cycle re-implementation
The thread deletion is now supported on SMP.

This change fixes the following PRs:

PR1814: SMP race condition between stack free and dispatch

PR2035: psxcancel reveals NULL pointer access in _Thread_queue_Extract()

The POSIX cleanup handler are now called in the right context (should be
called in the context of the terminating thread).

http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html

Add a user extension the reflects a thread termination event.  This is
used to reclaim the Newlib reentrancy structure (may use file
operations), the POSIX cleanup handlers and the POSIX key destructors.
2014-03-31 08:29:43 +02:00
Christian Mauderer
5c0c0cf2a6 privateenv: Use POSIX keys instead of task variables. 2014-03-27 14:50:36 +01:00
Christian Mauderer
5ef9f23fb4 libcsupport: Use POSIX keys for GXX key functions
With this patch C++ applications now eventually need additional POSIX-keys and
POSIX-key-value-pairs configured.
2014-03-24 08:31:49 +01:00
Christian Mauderer
9d9df8b44e libcsupport: Remove unused gxx-wrapper function.
The rtems_gxx_key_dtor function is not longer used by gcc.
2014-03-24 08:31:49 +01:00
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Sebastian Huber
d50acdbb6c score: Add local context to SMP lock API
Add a local context structure to the SMP lock API for acquire and
release pairs.  This context can be used to store the ISR level and
profiling information.  It may be later used to enable more
sophisticated lock algorithms, e.g. MCS locks.

There is only one lock that cannot be used with a local context.  This
is the per-CPU lock since here we would have to transfer the local
context through a context switch which is very complicated.
2014-03-11 10:58:09 +01:00
Sebastian Huber
bab16de267 score: Change debug helper functions
Rename rtems_internal_error_description() to
rtems_internal_error_text().  Rename rtems_fatal_source_description() to
rtems_fatal_source_text().  Rename rtems_status_code_description() to
rtems_status_text().  Remove previous implementation of
rtems_status_text().
2014-02-12 09:18:00 +01:00
Daniel Ramirez
35b8f48a4b libcsupport: Refactor rtems_deviceio_errno
Renames rtems_deviceio_errno to rtems_status_code_to_errno and
integrates it into the Classic API Status Handler. This function
can now be called by including status.h
2014-01-08 15:24:09 -06:00
Daniel Ramirez
564ce0f42d libcsupport: implemented termios functions cfsetspeed and cfmakeraw 2014-01-07 10:34:31 -06:00
Sebastian Huber
c1d8ee4cdc libcsupport: Accept NULL for zero-length entries 2013-12-20 10:31:53 +01:00
Sebastian Huber
2f68778f08 Filesystem: Add readv/writev handlers
The readv() and writev() support was implemented in terms of multiple
calls to the read and write handlers.  This imposes a problem on device
files which use an IO vector as single request entity.  For example a
low-level network device (e.g. BPF(4)) may use an IO vector to create
one frame from multiple protocol layers each with its own IO vector
entry.
2013-12-20 10:31:53 +01:00
Sebastian Huber
95a57280eb libcsupport: Add and use rtems_libio_iovec_eval() 2013-12-20 10:31:53 +01:00
Chris Johns
6122cb6af6 PR2158: Add support for dup2.
Split the dub call into dup and dup2 in fcntl.c. This requires
a private command which is placed in the internal libio header.
2013-12-10 12:35:29 +11:00
Joel Sherrill
03e54614a3 statvfs filesystem handlers: Remove restrict 2013-11-27 13:06:16 -06:00
Daniel Ramirez
bb81e04ae3 statvfs and ALL filesystem handlers: Add restrict keyword. 2013-11-21 16:56:48 -06:00
Sebastian Huber
8cb28826ff Filesystem: Add kernel event filter handler
This handler is necessary to implement the KQUEUE(2) system calls.

Add <sys/event.h> from FreeBSD 8.4.
2013-11-04 15:22:48 +01:00
Sebastian Huber
1682946057 Filesystem: Add poll() handler
This handler is necessary to implement the SELECT(2) and POLL(2) system
calls.

Add <sys/poll.h> from FreeBSD 8.4.
2013-11-04 15:22:47 +01:00
Sebastian Huber
ba120d1aaa Filesystem: Use ENOTTY for default ioctl() handler
This is in line with Linux and FreeBSD.
2013-10-31 14:32:25 +01:00