summaryrefslogtreecommitdiff
path: root/cpukit/libcsupport/src/termios.c (follow)
AgeCommit message (Collapse)Author
2020-08-04termios: Make rtems_termios_ttyMutex privateSebastian Huber
This mutex is used to maintain termios internal data structures.
2020-05-07termios: Replace rtems_termios_isig_status_codeSebastian Huber
Merge the rtems_termios_isig_status_code and rtems_termios_iproc_status_code enums into a single rtems_termios_iproc_status_code which is now a part of the API. Simplify rtems_termios_posix_isig_handler() to avoid unreachable code. Close #3800.
2020-04-16Canonicalize config.h includeSebastian Huber
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2020-03-13libio: Robust file descriptor reference countingSebastian Huber
There was a race conditon in the reference counting of file descriptors during a close() operation. After the call to the close handler, the rtems_libio_free() function cleared the flags to zero. However, at this point in time there may still exist some holders of the file descriptor. With RTEMS_DEBUG enabled this could lead to failed assertions in rtems_libio_iop_drop(). Change the code to use only atomic read-modify-write operations on the rtems_libio_iop::flags.
2020-02-10termios: Fix input canonical modeSebastian Huber
Canonical input processing was broken by 667501a314ba75f80f1c13c6b43dd35d0a00efd1 as shown by test case termios09. Update #3800.
2019-10-08termios: Add Capability to Generate SIGINTR and SIGQUITJoel Sherrill
This patch adds the ability for termios to send SIGINTR on receipt of VINTR and SIGQUIT for VKILL and return -1/EINTR from read() on a termios channel. Importantly, this patch does not alter the default behavior or force POSIX signal code in just because termios is used. The application must explicitly enable the POSIX behavior of generating a signal upon receipt of these characters. This is discussed in the POSIX standard: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap11.html Closes #3800.
2018-11-07termios: Move default lock functionsSebastian Huber
Move rtems_termios_device_lock_acquire_default() and rtems_termios_device_lock_release_default() to a file separate from the general Termios support. This avoids complex dependencies in printk() only scenarios.
2018-10-02Use rtems_task_exit()Sebastian Huber
Update #3530. Update #3533.
2018-02-22termios: Fix use of uninitialized variableSebastian Huber
Update #2840.
2018-02-02termios: Use self-contained objectsSebastian Huber
Update #2840.
2017-11-07termios: Fix canonical modeSebastian Huber
In canonical mode, input is made available line by line. We must stop the canonical buffer filling upon reception of an end-of-line character. Close #3218.
2017-09-15libio: Add rtems_libio_iop_is_no_delay()Sebastian Huber
Update #3132.
2017-08-25Include missing <string.h>Sebastian Huber
Update #2133.
2017-07-28Fix IO control request typeSebastian Huber
2017-07-14posix/mmap: Add support for file handler and MAP_ANONKevin Kirspel
Added a mmap file handler to struct _rtems_filesystem_file_handlers_r. Updated each file handler object to support the default mmap handler. Updated mmap() to call the mmap handler for MAP_SHARED. Added a mmap file handler for shm Added support for MAP_ANON in mmap(). Updates #2859
2017-06-07Do not include <sys/ioctl.h> in kernel-spaceSebastian Huber
Update #2833.
2017-06-07Move RTEMS-specific Termios API contentSebastian Huber
Remove obsolete support for OFILL, OFDEL, NLDLY, CRDLY, BSDLY, VTDLY, and FFDLY which is not present on FreeBSD and not implemented in Linux. Update #2833.
2017-04-10Updating default termios initialization for dedicated input/output baud ratesKevin Kirspel
updates #2897.
2017-03-27termios: Avoid invalid memory accessSebastian Huber
Update #2897.
2017-03-22termios: Synchronize with latest FreeBSD headersKevin Kirspel
Adding modified FreeBSD headers to synchronize RTEMS termios with FreeBSD. Modify termios to support dedicated input and output baud for termios structure. Updated BSPs to use dedicated input and output baud in termios structure. Updated tools to use dedicated input and output baud in termios structure. Updated termios testsuites to use dedicated input and output baud in termios structure. Close #2897.
2017-02-28termios: Simplify some calculationsSebastian Huber
Use the modular arithmetic addition rule.
2017-02-28termios: Implement non-blocking writeSebastian Huber
2017-02-28termios: Make write POSIX compatibleSebastian Huber
Currently only blocking read/write operations are implemented. A blocking write must transfer at least one character. It should not wait for the device for the second character and so on. Close #2917.
2017-02-28termios: Introduce doTransmit()Sebastian Huber
2017-02-28termios: Simplify oproc()Sebastian Huber
Call rtems_termios_puts() only once. Adjust column in one place.
2017-02-28termios: Fix infinite loop in receive pathSebastian Huber
In canonical mode, the raw input buffer or the canonical buffer may overflow without an end of line. Avoid an infinite loop in this case. Close #2915.
2017-02-28termios: Change receive callback invocationSebastian Huber
Call the receive callback in case a read will succeed without to block. This enables the use of the receive callback for a poll() and select() support. Increase raw input buffer size to allow buffering of one line. Close #2916.
2017-02-28termios: Change tty_rcvwakeup to boolSebastian Huber
Optimize callout invocation check.
2017-02-28termios: Ignore carriage return early if desiredSebastian Huber
In case carriage return characters should be ignored in the input (IGNCR), then drop them early before they reach the raw input buffer. This makes it easier to calculate the content size of the raw input buffer.
2017-02-28termios: Protect raw input buffer with device lockSebastian Huber
Use the device lock to protect the raw input buffer management, e.g. tail, head and buffer content updates. Close #2914.
2017-02-28termios: Simplify rtems_termios_read_tty()Sebastian Huber
Remove dead code. Update #2914.
2017-02-23termios: Add kqueue() and poll() supportSebastian Huber
Real implementation is provided by libbsd.
2017-02-03termios: Fix static device initalizationSebastian Huber
This enables early printk() support. Update #2838.
2016-12-16termios: Add TERMIOS_IRQ_SERVER_DRIVENAlexander Krutwig
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-16termios: Use mutex for task driven modeSebastian Huber
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-09-19termios: Add IO control handlerSebastian Huber
Update #2785.
2016-09-19termios: Use IMFS nodes for new Termios devicesSebastian Huber
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-07-22score: Add debug support to chainsSebastian Huber
This helps to detect * double insert, append, prepend errors, and * get from empty chain errors.
2014-11-21libcsupport/src/termios.c: Explicitly ignore return value (Coverity ID 1255347)Joel Sherrill
Coverity spotted that we were ignoring a return value. But ignoring it is intentional. Adding (void) clearly indicates it is being ignored explicitly.
2014-10-07termios: Partially hide rtems_termios_ttySebastian Huber
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-07termios: Separate flow control from normal handlerSebastian Huber
2014-10-07termios: Fix transmit daemonSebastian Huber
Do not call rtems_termios_refill_transmitter() in case a PPP line discipline is present. This is similar to rtems_termios_dequeue_characters().
2014-08-18rtems_termios_puts: Copy and write more than one char at onceKolja Waschk
Renamed startXmit(), nToSend is unsigned, just check FL_ORCVXOF, no (void) cast anymore, compute nToSend in single if/else if/else.
2014-07-09termios: PR1279: Use first open statusSebastian Huber
2014-07-09termios: PR1279: Use set attributes statusSebastian Huber
2014-07-09termios: PR2153: New low-level device APISebastian Huber
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-06-30termios: Make tty list staticSebastian Huber
2014-03-21Change all references of rtems.com to rtems.org.Chris Johns
2014-03-14score: Add SMP lock profiling supportSebastian Huber
2014-03-11score: Add function to destroy SMP locksSebastian Huber