OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [libcsupport/] [src/] [termiosinitialize.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*
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
 *  termiosinitialize.c,v 1.2 2001/01/08 18:26:44 joel Exp
16
 */
17
 
18
#if HAVE_CONFIG_H
19
#include "config.h"
20
#endif
21
 
22
#include <rtems.h>
23
#include <rtems.h>
24
#include <rtems/libio.h>
25
#include <ctype.h>
26
#include <errno.h>
27
#include <stdio.h>
28
#include <stdlib.h>
29
#include <termios.h>
30
#include <unistd.h>
31
 
32
struct rtems_termios_tty *rtems_termios_ttyHead;
33
struct rtems_termios_tty *rtems_termios_ttyTail;
34
rtems_id rtems_termios_ttyMutex;
35
 
36
void
37
rtems_termios_initialize (void)
38
{
39
  rtems_status_code sc;
40
 
41
  /*
42
   * Create the mutex semaphore for the tty list
43
   */
44
  if (!rtems_termios_ttyMutex) {
45
    sc = rtems_semaphore_create (
46
      rtems_build_name ('T', 'R', 'm', 'i'),
47
      1,
48
      RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
49
      RTEMS_NO_PRIORITY,
50
      &rtems_termios_ttyMutex);
51
    if (sc != RTEMS_SUCCESSFUL)
52
      rtems_fatal_error_occurred (sc);
53
  }
54
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.