Commit Graph

391 Commits

Author SHA1 Message Date
Sebastian Huber
66fac03fae libio: Fix deadlock in location management
Perform a context-dependent deferred location release to avoid a
deadlock on the file system instance locks, for example during a
chdir().

Update #2936.
2017-03-16 15:33:56 +01:00
Sebastian Huber
49d8f653fb termios: Change tty_rcvwakeup to bool
Optimize callout invocation check.
2017-02-28 08:51:31 +01:00
Sebastian Huber
5bfeddc0c2 termios: Add kqueue() and poll() support
Real implementation is provided by libbsd.
2017-02-23 07:27:43 +01:00
Sebastian Huber
85ed95ec48 termios: Fix static device initalization
This enables early printk() support.

Update #2838.
2017-02-03 10:49:13 +01:00
Sebastian Huber
3b784ba028 Fix documentation comment 2017-01-12 14:18:58 +01:00
Sebastian Huber
a3730b38cc Add and use rtems_assoc_thread_states_to_string() 2017-01-12 07:44:37 +01:00
Sebastian Huber
0c431303cc Add rtems_assoc_32_to_string() 2017-01-12 07:44:36 +01:00
Sebastian Huber
45ae4a89e7 sys/event.h: Update to FreeBSD head 2017-01-02 2017-01-09 14:53:26 +01:00
Alexander Krutwig
e34fe384cb termios: Add TERMIOS_IRQ_SERVER_DRIVEN
Add a new interrupt server driven Termios mode (TERMIOS_IRQ_DRIVEN).
This mode is identical to the interrupt driven mode except that a mutex
is used for device level locking. The intended use case for this mode
are device drivers that use the interrupt server, e.g. SPI or I2C
connected devices.

Update #2839.
2016-12-16 09:04:58 +01:00
Sebastian Huber
c3764ce805 termios: Use mutex for task driven mode
Termios has a task driven mode (TERMIOS_TASK_DRIVEN). This mode aims to
avoid long sections with disabled interrupts. This is only partly
implemented since the device level state is still protected by disabled
interrupts. Use a mutex to protect the device level state in task driven
mode to fix this issue.

Update #2838.
2016-12-16 09:04:58 +01:00
Sebastian Huber
c42be504c9 posix: Add self-contained pthread spinlock
Turn pthread_spinlock_t into a self-contained object.  On uni-processor
configurations, interrupts are disabled in the lock/trylock operations
and the previous interrupt status is restored in the corresponding
unlock operations.  On SMP configurations, a ticket lock is a acquired
and released in addition.

The self-contained pthread_spinlock_t object is defined by Newlib in
<sys/_pthreadtypes.h>.

typedef struct {
  struct _Ticket_lock_Control _lock;
  __uint32_t                  _interrupt_state;
} pthread_spinlock_t;

This implementation is simple and efficient.  However, this test case of
the Linux Test Project would fail due to call of printf() and sleep()
during spin lock ownership:

https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c

There is only limited support for profiling on SMP configurations.

Delete CORE spinlock implementation.

Update #2674.
2016-11-23 12:52:06 +01:00
Sebastian Huber
6de41c5fe9 Provide kernel space header files
These kernel space header files must be provided for Newlib
172e2050d95b41861db858dd9bc43a3fb4a28987.
2016-11-08 10:15:28 +01:00
Sebastian Huber
1aae680bec sys/sockio.h: Update to FreeBSD head 2016-05-03 2016-10-26 14:05:53 +02:00
Sebastian Huber
8b8d05f4ca sys/event.h: Update to FreeBSD head 2016-06-27 2016-10-26 14:05:44 +02:00
Sebastian Huber
e814a233ed termios: Add IO control handler
Update #2785.
2016-09-19 07:52:34 +02:00
Sebastian Huber
55e0be3606 termios: Use IMFS nodes for new Termios devices
This makes the new Termios devices independent of device major/minor
numbers.  It enables BSP independent Termios device drivers which may
reside in the cpukit domain.  These drivers require an IMFS and do not
work with the device file system.  However, the device file system
should go away in the future.
2016-09-19 07:52:33 +02:00
Sebastian Huber
c8982e5f6a posix: Simplify message queues
The mq_open() function returns a descriptor to a POSIX message queue
object identified by a name.  This is similar to sem_open().  In
contrast to the POSIX semaphore the POSIX message queues use a separate
object for the descriptor.  This extra object is superfluous, since the
object identifier can be used directly for this purpose, just like for
the semaphores.

Update #2702.
Update #2555.
2016-05-02 07:46:15 +02:00
Joel Sherrill
92b6f6e9c9 Move various driver interface definition headers file libcsupport/ to include/
These were in libcsupport for historical reasons and the placement
no longer made sense.

As part of this move, some of the files were placed under subdirectories
which reflect their installed location.

Thank you git for allowing us to move files. Years of CVS resulted
in files being somewhere they no longer belonged.
2016-03-30 09:32:33 -05:00
Sebastian Huber
ca4602e914 Use linker set for libio initialization
Update #2408.
2016-02-03 10:00:57 +01:00
Sebastian Huber
f64c6b4c49 Use atexit() handler to close std file descriptors 2016-02-03 10:00:57 +01:00
Sebastian Huber
3d36164fe5 Use linker set for root file system initialization
Update #2408.
2016-02-03 10:00:57 +01:00
Sebastian Huber
e079b33e76 Filesystem: Export most generic path eval function
Add path length parameter to
rtems_filesystem_eval_path_start_with_root_and_current() so that users
may pass paths without a '\0' termination.

Update #2558.
2016-02-02 08:06:10 +01:00
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