Last change
on this file since 9d5d371 was
726b27c,
checked in by Joel Sherrill <joel.sherrill@…>, on 12/13/13 at 17:01:48
|
schedsim: Update to latest RTEMS. Works Uniprocessor
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | /* |
---|
2 | * Initialize RTEMS Shell Command Implmentation |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-2013. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.com/license/LICENSE. |
---|
10 | */ |
---|
11 | |
---|
12 | #ifdef HAVE_CONFIG_H |
---|
13 | #include "config.h" |
---|
14 | #endif |
---|
15 | |
---|
16 | #include <stdio.h> |
---|
17 | |
---|
18 | #include <rtems.h> |
---|
19 | #include "shell.h" |
---|
20 | #include <schedsim_shell.h> |
---|
21 | #include <rtems/stringto.h> |
---|
22 | |
---|
23 | #if defined(RTEMS_SMP) |
---|
24 | #include <rtems/score/smp.h> |
---|
25 | |
---|
26 | uint32_t Schedsim_Maximum_CPUs_From_Command_Line; |
---|
27 | #endif |
---|
28 | |
---|
29 | |
---|
30 | int rtems_shell_main_rtems_init( |
---|
31 | int argc, |
---|
32 | char *argv[] |
---|
33 | ) |
---|
34 | { |
---|
35 | #if defined(RTEMS_SMP) |
---|
36 | long cpus; |
---|
37 | |
---|
38 | if ( argc >= 2 ) { |
---|
39 | if ( rtems_string_to_long(argv[1], &cpus, NULL, 0) ) { |
---|
40 | printf( "Number of CPUs argument (%s) is not a number\n", argv[1] ); |
---|
41 | return -1; |
---|
42 | } |
---|
43 | Schedsim_Maximum_CPUs_From_Command_Line = cpus; |
---|
44 | } |
---|
45 | #endif |
---|
46 | |
---|
47 | // |
---|
48 | // Initialize RTEMS |
---|
49 | // |
---|
50 | rtems_initialize_data_structures(); |
---|
51 | return 0; |
---|
52 | } |
---|
53 | |
---|
54 | rtems_shell_cmd_t rtems_shell_RTEMS_INIT_Command = { |
---|
55 | "rtems_init", /* name */ |
---|
56 | "rtems_init [cpus]", /* usage */ |
---|
57 | "rtems", /* topic */ |
---|
58 | rtems_shell_main_rtems_init, /* command */ |
---|
59 | NULL, /* alias */ |
---|
60 | NULL /* next */ |
---|
61 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.