4.104.114.84.95
Last change
on this file since 5a23ca84 was
5adf355a,
checked in by Joel Sherrill <joel.sherrill@…>, on 05/27/99 at 16:11:52
|
Split initialization and reserve resources from termios to reduce
size of mininum application.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /* |
---|
2 | * Termios initialization routine |
---|
3 | * |
---|
4 | * Author: |
---|
5 | * W. Eric Norum |
---|
6 | * Saskatchewan Accelerator Laboratory |
---|
7 | * University of Saskatchewan |
---|
8 | * Saskatoon, Saskatchewan, CANADA |
---|
9 | * eric@skatter.usask.ca |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.OARcorp.com/rtems/license.html. |
---|
14 | * |
---|
15 | * $Id$ |
---|
16 | */ |
---|
17 | |
---|
18 | #include <rtems.h> |
---|
19 | #include <rtems.h> |
---|
20 | #include <rtems/libio.h> |
---|
21 | #include <ctype.h> |
---|
22 | #include <errno.h> |
---|
23 | #include <stdio.h> |
---|
24 | #include <stdlib.h> |
---|
25 | #include <termios.h> |
---|
26 | #include <unistd.h> |
---|
27 | |
---|
28 | struct rtems_termios_tty *rtems_termios_ttyHead; |
---|
29 | struct rtems_termios_tty *rtems_termios_ttyTail; |
---|
30 | rtems_id rtems_termios_ttyMutex; |
---|
31 | |
---|
32 | void |
---|
33 | rtems_termios_initialize (void) |
---|
34 | { |
---|
35 | rtems_status_code sc; |
---|
36 | |
---|
37 | /* |
---|
38 | * Create the mutex semaphore for the tty list |
---|
39 | */ |
---|
40 | if (!rtems_termios_ttyMutex) { |
---|
41 | sc = rtems_semaphore_create ( |
---|
42 | rtems_build_name ('T', 'R', 'm', 'i'), |
---|
43 | 1, |
---|
44 | RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, |
---|
45 | RTEMS_NO_PRIORITY, |
---|
46 | &rtems_termios_ttyMutex); |
---|
47 | if (sc != RTEMS_SUCCESSFUL) |
---|
48 | rtems_fatal_error_occurred (sc); |
---|
49 | } |
---|
50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.