source: rtems/c/src/lib/libbsp/i386/pc386/startup/bspclean.c @ 9353a0d4

4.104.114.95
Last change on this file since 9353a0d4 was 9353a0d4, checked in by Joel Sherrill <joel.sherrill@…>, on 08/21/08 at 19:34:40

2008-08-21 Joel Sherrill <joel.sherrill@…>

  • startup/bspclean.c: New file.
  • startup/exit.c: Removed.
  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 * Routines to shutdown and reboot the PC.
3 *
4 * (C) Copyright 1997 -
5 * - NavIST Group - Real-Time Distributed Systems and Industrial Automation
6 *   http://pandora.ist.utl.pt
7 *   Instituto Superior Tecnico * Lisboa * PORTUGAL
8 *
9 *  Disclaimer:
10 *
11 * This file is provided "AS IS" without warranty of any kind, either
12 * expressed or implied.
13 *
14 *
15 * This code is based on:
16 *   exit.c,v 1.2 1995/12/19 20:07:36 joel Exp -  go32 BSP
17 * With the following copyright notice:
18 * **************************************************************************
19 * *  COPYRIGHT (c) 1989-1999.
20 * *  On-Line Applications Research Corporation (OAR).
21 * *
22 * *  The license and distribution terms for this file may be
23 * *  found in found in the file LICENSE in this distribution or at
24 * *  http://www.rtems.com/license/LICENSE.
25 * **************************************************************************
26 *
27 * Joel: It has been modified many times since submission.
28 *
29 *  $Id$
30 */
31
32#include <stdio.h>
33#include <bsp.h>
34#include <rtems/libio.h>
35#include <uart.h>
36
37void bsp_cleanup(void)
38{
39  /*
40   * At this point, the console driver is disconnected => we must
41   * use polled output/input. This is exactly what printk
42   * does.
43   */
44  printk( "\nEXECUTIVE SHUTDOWN! " );
45
46  #if (BSP_PRESS_KEY_FOR_RESET)
47    {
48      unsigned char ch;
49
50      printk( "Any key to reboot..." );
51      ch = BSP_poll_char();
52    }
53  #else
54    printk( "resetting system\n" );
55  #endif
56  rtemsReboot();
57}
Note: See TracBrowser for help on using the repository browser.