Last change
on this file was
153b2669,
checked in by Sebastian Huber <sebastian.huber@…>, on 05/07/20 at 06:45:29
|
termios: Replace rtems_termios_isig_status_code
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.
|
-
Property mode set to
100644
|
File size:
666 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * TERMIOS POSIX behavior on INTR and QUIT characters |
---|
4 | */ |
---|
5 | |
---|
6 | /* |
---|
7 | * COPYRIGHT (c) 1989-2012,2019. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * |
---|
10 | * SPDX-License-Identifier: BSD-2-Clause |
---|
11 | */ |
---|
12 | |
---|
13 | #ifdef HAVE_CONFIG_H |
---|
14 | #include "config.h" |
---|
15 | #endif |
---|
16 | |
---|
17 | #include <rtems.h> |
---|
18 | #include <rtems/libio.h> |
---|
19 | #include <rtems/termiostypes.h> |
---|
20 | |
---|
21 | #include <signal.h> |
---|
22 | |
---|
23 | rtems_termios_iproc_status_code rtems_termios_posix_isig_handler( |
---|
24 | unsigned char c, |
---|
25 | struct rtems_termios_tty *tty |
---|
26 | ) |
---|
27 | { |
---|
28 | int sig; |
---|
29 | |
---|
30 | if ( c == tty->termios.c_cc[ VQUIT ] ) { |
---|
31 | sig = SIGQUIT; |
---|
32 | } else { |
---|
33 | sig = SIGINT; |
---|
34 | } |
---|
35 | |
---|
36 | (void) raise( sig ); |
---|
37 | |
---|
38 | return RTEMS_TERMIOS_IPROC_INTERRUPT; |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.