1 | /** |
---|
2 | * @file |
---|
3 | * @brief Scheduler Simulator Internals |
---|
4 | * |
---|
5 | * @note BASED UPON SOURCE IN RTEMS, MODIFIED FOR SIMULATOR |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-2014. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.com/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __SCHEDSIM_SHELL_h |
---|
18 | #define __SCHEDSIM_SHELL_h |
---|
19 | |
---|
20 | #include <rtems.h> |
---|
21 | #include <rtems/score/sysstate.h> |
---|
22 | |
---|
23 | #ifdef __cplusplus |
---|
24 | extern "C" { |
---|
25 | #endif |
---|
26 | |
---|
27 | void add_commands(void); |
---|
28 | |
---|
29 | #define CHECK_RTEMS_IS_UP() \ |
---|
30 | do { \ |
---|
31 | if ( _System_state_Current != SYSTEM_STATE_UP ) { \ |
---|
32 | fprintf( stderr, "RTEMS is not initialized yet\n" ); \ |
---|
33 | return -1; \ |
---|
34 | } \ |
---|
35 | } while (0) |
---|
36 | |
---|
37 | void PRINT_EXECUTING(void); |
---|
38 | void PRINT_HEIR(void); |
---|
39 | |
---|
40 | void schedsim_set_allow_dispatch(bool value); |
---|
41 | bool schedsim_is_dispatch_allowed(void); |
---|
42 | |
---|
43 | struct rtems_shell_topic_tt; |
---|
44 | typedef struct rtems_shell_topic_tt rtems_shell_topic_t; |
---|
45 | |
---|
46 | struct rtems_shell_topic_tt { |
---|
47 | const char *topic; |
---|
48 | rtems_shell_topic_t *next; |
---|
49 | }; |
---|
50 | |
---|
51 | extern rtems_shell_cmd_t * rtems_shell_first_cmd; |
---|
52 | extern rtems_shell_topic_t * rtems_shell_first_topic; |
---|
53 | |
---|
54 | rtems_shell_topic_t * rtems_shell_lookup_topic(const char *topic); |
---|
55 | |
---|
56 | extern rtems_shell_cmd_t *rtems_shell_Initial_commands[]; |
---|
57 | extern rtems_shell_alias_t *rtems_shell_Initial_aliases[]; |
---|
58 | |
---|
59 | int lookup_task( |
---|
60 | const char *string, |
---|
61 | rtems_id *id |
---|
62 | ); |
---|
63 | |
---|
64 | int lookup_semaphore( |
---|
65 | const char *string, |
---|
66 | rtems_id *id |
---|
67 | ); |
---|
68 | |
---|
69 | #ifdef __cplusplus |
---|
70 | } |
---|
71 | #endif |
---|
72 | |
---|
73 | #endif |
---|