source: rtems-schedsim/schedsim/shell/shared/schedsim_shell.h @ 36f4cb9

Last change on this file since 36f4cb9 was 36f4cb9, checked in by Joel Sherrill <joel.sherrill@…>, on 05/23/14 at 21:46:22

Use shared main() and file processor

  • Property mode set to 100644
File size: 1.5 KB
Line 
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
24extern "C" {
25#endif
26
27void 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
37void PRINT_EXECUTING(void);
38void PRINT_HEIR(void);
39
40void schedsim_set_allow_dispatch(bool value);
41bool schedsim_is_dispatch_allowed(void);
42
43struct rtems_shell_topic_tt;
44typedef struct rtems_shell_topic_tt rtems_shell_topic_t;
45
46struct rtems_shell_topic_tt {
47  const char          *topic;
48  rtems_shell_topic_t *next;
49};
50
51extern rtems_shell_cmd_t   * rtems_shell_first_cmd;
52extern rtems_shell_topic_t * rtems_shell_first_topic;
53
54rtems_shell_topic_t * rtems_shell_lookup_topic(const char *topic);
55
56extern rtems_shell_cmd_t *rtems_shell_Initial_commands[];
57extern rtems_shell_alias_t *rtems_shell_Initial_aliases[];
58
59int lookup_task(
60  const char *string,
61  rtems_id   *id
62);
63
64int lookup_semaphore(
65  const char *string,
66  rtems_id   *id
67);
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif
Note: See TracBrowser for help on using the repository browser.