source: rtems/cpukit/libcsupport/src/termiosinitialize.c @ f6b1e063

4.115
Last change on this file since f6b1e063 was f6b1e063, checked in by Sebastian Huber <sebastian.huber@…>, on 06/27/14 at 11:08:28

termios: Make tty list static

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/**
2 *  @file
3 *
4 *  @brief Termios Initialization
5 *  @ingroup Termios
6 */
7
8/*
9 *  Author:
10 *    W. Eric Norum
11 *    Saskatchewan Accelerator Laboratory
12 *    University of Saskatchewan
13 *    Saskatoon, Saskatchewan, CANADA
14 *    eric@skatter.usask.ca
15 *
16 *  The license and distribution terms for this file may be
17 *  found in the file LICENSE in this distribution or at
18 *  http://www.rtems.org/license/LICENSE.
19 */
20
21#if HAVE_CONFIG_H
22#include "config.h"
23#endif
24
25#include <rtems.h>
26#include <rtems.h>
27#include <rtems/libio.h>
28#include <ctype.h>
29#include <errno.h>
30#include <stdio.h>
31#include <stdlib.h>
32#include <termios.h>
33#include <unistd.h>
34
35rtems_id rtems_termios_ttyMutex;
36
37void
38rtems_termios_initialize (void)
39{
40  rtems_status_code sc;
41
42  /*
43   * Create the mutex semaphore for the tty list
44   */
45  if (!rtems_termios_ttyMutex) {
46    sc = rtems_semaphore_create (
47      rtems_build_name ('T', 'R', 'm', 'i'),
48      1,
49      RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
50      RTEMS_NO_PRIORITY,
51      &rtems_termios_ttyMutex);
52    if (sc != RTEMS_SUCCESSFUL)
53      rtems_fatal_error_occurred (sc);
54  }
55}
Note: See TracBrowser for help on using the repository browser.