summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/termios.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpukit/: Update Eric Norum contact info and normalize file headersJoel Sherrill2022-03-241-9/+4
|
* termios: Pass number of sent chars to l_startChristian Mauderer2022-02-101-2/+3
| | | | | | | | | | | | | At the moment the line discipline start function (l_start) has no possibility to get feedback about the number of characters that have been sent. This patch passes that information via an additional parameter. The change might trigger a warning on existing code because of a pointer mismatch but it shouldn't break it. An existing function with the old API will just ignore the additional parameter. Update #4493
* termios: Make rtems_termios_ttyMutex privateSebastian Huber2020-08-041-0/+3
| | | | This mutex is used to maintain termios internal data structures.
* termios: Replace rtems_termios_isig_status_codeSebastian Huber2020-05-071-31/+3
| | | | | | | | | | 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.
* Canonicalize config.h includeSebastian Huber2020-04-161-1/+1
| | | | | | | | Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
* libio: Robust file descriptor reference countingSebastian Huber2020-03-131-3/+3
| | | | | | | | | | | | 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.
* termios: Fix input canonical modeSebastian Huber2020-02-101-50/+33
| | | | | | | | Canonical input processing was broken by 667501a314ba75f80f1c13c6b43dd35d0a00efd1 as shown by test case termios09. Update #3800.
* termios: Add Capability to Generate SIGINTR and SIGQUITJoel Sherrill2019-10-081-39/+186
| | | | | | | | | | | | | | 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.
* termios: Move default lock functionsSebastian Huber2018-11-071-18/+0
| | | | | | | 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.
* Use rtems_task_exit()Sebastian Huber2018-10-021-2/+2
| | | | | Update #3530. Update #3533.
* termios: Fix use of uninitialized variableSebastian Huber2018-02-221-4/+4
| | | | Update #2840.
* termios: Use self-contained objectsSebastian Huber2018-02-021-151/+75
| | | | Update #2840.
* termios: Fix canonical modeSebastian Huber2017-11-071-2/+4
| | | | | | | 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.
* libio: Add rtems_libio_iop_is_no_delay()Sebastian Huber2017-09-151-1/+1
| | | | Update #3132.
* Include missing <string.h>Sebastian Huber2017-08-251-0/+1
| | | | Update #2133.
* Fix IO control request typeSebastian Huber2017-07-281-1/+2
|
* posix/mmap: Add support for file handler and MAP_ANONKevin Kirspel2017-07-141-0/+1
| | | | | | | | | | | 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
* Do not include <sys/ioctl.h> in kernel-spaceSebastian Huber2017-06-071-0/+1
| | | | Update #2833.
* Move RTEMS-specific Termios API contentSebastian Huber2017-06-071-2/+2
| | | | | | | 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.
* Updating default termios initialization for dedicated input/output baud ratesKevin Kirspel2017-04-101-1/+4
| | | | updates #2897.
* termios: Avoid invalid memory accessSebastian Huber2017-03-271-1/+3
| | | | Update #2897.
* termios: Synchronize with latest FreeBSD headersKevin Kirspel2017-03-221-19/+25
| | | | | | | | | | | 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.
* termios: Simplify some calculationsSebastian Huber2017-02-281-4/+3
| | | | Use the modular arithmetic addition rule.
* termios: Implement non-blocking writeSebastian Huber2017-02-281-4/+6
|
* termios: Make write POSIX compatibleSebastian Huber2017-02-281-34/+81
| | | | | | | | 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.
* termios: Introduce doTransmit()Sebastian Huber2017-02-281-10/+15
|
* termios: Simplify oproc()Sebastian Huber2017-02-281-19/+36
| | | | Call rtems_termios_puts() only once. Adjust column in one place.
* termios: Fix infinite loop in receive pathSebastian Huber2017-02-281-5/+9
| | | | | | | 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.
* termios: Change receive callback invocationSebastian Huber2017-02-281-11/+47
| | | | | | | | 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.
* termios: Change tty_rcvwakeup to boolSebastian Huber2017-02-281-9/+9
| | | | Optimize callout invocation check.
* termios: Ignore carriage return early if desiredSebastian Huber2017-02-281-6/+19
| | | | | | | 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.
* termios: Protect raw input buffer with device lockSebastian Huber2017-02-281-16/+36
| | | | | | | Use the device lock to protect the raw input buffer management, e.g. tail, head and buffer content updates. Close #2914.
* termios: Simplify rtems_termios_read_tty()Sebastian Huber2017-02-281-11/+4
| | | | | | Remove dead code. Update #2914.
* termios: Add kqueue() and poll() supportSebastian Huber2017-02-231-2/+2
| | | | Real implementation is provided by libbsd.
* termios: Fix static device initalizationSebastian Huber2017-02-031-6/+6
| | | | | | This enables early printk() support. Update #2838.
* termios: Add TERMIOS_IRQ_SERVER_DRIVENAlexander Krutwig2016-12-161-1/+2
| | | | | | | | | | 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.
* termios: Use mutex for task driven modeSebastian Huber2016-12-161-2/+76
| | | | | | | | | | 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.
* termios: Add IO control handlerSebastian Huber2016-09-191-2/+5
| | | | Update #2785.
* termios: Use IMFS nodes for new Termios devicesSebastian Huber2016-09-191-183/+277
| | | | | | | | 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.
* score: Add debug support to chainsSebastian Huber2016-07-221-0/+1
| | | | | | | This helps to detect * double insert, append, prepend errors, and * get from empty chain errors.
* libcsupport/src/termios.c: Explicitly ignore return value (Coverity ID 1255347)Joel Sherrill2014-11-211-3/+6
| | | | | | Coverity spotted that we were ignoring a return value. But ignoring it is intentional. Adding (void) clearly indicates it is being ignored explicitly.
* termios: Partially hide rtems_termios_ttySebastian Huber2014-10-071-52/+90
| | | | | | | 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.
* termios: Separate flow control from normal handlerSebastian Huber2014-10-071-8/+15
|
* termios: Fix transmit daemonSebastian Huber2014-10-071-1/+9
| | | | | | Do not call rtems_termios_refill_transmitter() in case a PPP line discipline is present. This is similar to rtems_termios_dequeue_characters().
* rtems_termios_puts: Copy and write more than one char at onceKolja Waschk2014-08-181-50/+85
| | | | Renamed startXmit(), nToSend is unsigned, just check FL_ORCVXOF, no (void) cast anymore, compute nToSend in single if/else if/else.
* termios: PR1279: Use first open statusSebastian Huber2014-07-091-73/+82
|
* termios: PR1279: Use set attributes statusSebastian Huber2014-07-091-2/+4
|
* termios: PR2153: New low-level device APISebastian Huber2014-07-091-103/+400
| | | | | | | | | | | | | | | | | 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.
* termios: Make tty list staticSebastian Huber2014-06-301-2/+3
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|