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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libc/] [termiosinitialize.c] - Blame information for rev 227

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
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: termiosinitialize.c,v 1.2 2001-09-27 12:01:15 chris Exp $
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
}

powered by: WebSVN 2.1.0

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