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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [unix/] [posix/] [startup/] [main.c] - Blame information for rev 1026

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

Line No. Rev Author Line
1 1026 ivang
/*
2
 *  Description:
3
 *  This file exists solely to (try to) ensure RTEMS is initialized.
4
 *  It is not to be used in systems which want C++ support.
5
 *
6
 *  main.c,v 1.1 1998/05/22 11:03:03 joel Exp
7
 */
8
 
9
#include <bsp.h>
10
#include <stdio.h>
11
#include <stdlib.h>
12
 
13
/*
14
 * RTEMS program name
15
 * Probably not used by anyone, but it is nice to have it.
16
 * Actually the UNIX version of CPU_INVOKE_DEBUGGER will probably
17
 * need to use it
18
 */
19
 
20
char *rtems_progname;
21
 
22
int main(
23
  int argc,
24
  char **argv
25
)
26
{
27
  rtems_argc = argc;
28
  rtems_argv = argv;
29
 
30
  bsp_start();
31
 
32
  if ((argc > 0) && argv && argv[0])
33
      rtems_progname = argv[0];
34
  else
35
      rtems_progname = "RTEMS";
36
 
37
  /*
38
   *  Start multitasking
39
   */
40
 
41
  rtems_initialize_executive_late( bsp_isr_level );
42
 
43
  /*
44
   * Returns when multitasking is stopped
45
   * This allows our destructors to get run normally
46
   */
47
 
48
  fflush( stdout );
49
  fflush( stderr );
50
 
51
  bsp_cleanup();
52
 
53
  return 0;
54
}

powered by: WebSVN 2.1.0

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