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