source: rtems/cpukit/libmisc/shell/shellconfig.h @ 543fe820

4.104.114.95
Last change on this file since 543fe820 was 543fe820, checked in by Joel Sherrill <joel.sherrill@…>, on 12/18/07 at 20:36:40

2007-12-18 Joel Sherrill <joel.sherrill@…>

  • libcsupport/Makefile.am, libcsupport/preinstall.am, libcsupport/src/malloc.c, libcsupport/src/mallocinfo.c, libmisc/Makefile.am, libmisc/shell/main_mallocinfo.c, libmisc/shell/shellconfig.h: Split malloc.c into multiple files with one function per file. Also split out statistics into a separate file which can be plugged in dynamically. Right now, it is always in. I suspect that splitting the file removed more code than leaving statistics in. I tinkered with malloc information command in the shell. I resurrected the malloc arena code as malloc boundary. This code is now compiled all the time even though it does not appear to work.
  • libcsupport/include/rtems/malloc.h, libcsupport/src/_calloc_r.c, libcsupport/src/_free_r.c, libcsupport/src/_malloc_r.c, libcsupport/src/_realloc_r.c, libcsupport/src/calloc.c, libcsupport/src/free.c, libcsupport/src/malloc_boundary.c, libcsupport/src/malloc_get_statistics.c, libcsupport/src/malloc_initialize.c, libcsupport/src/malloc_p.h, libcsupport/src/malloc_report_statistics.c, libcsupport/src/malloc_report_statistics_plugin.c, libcsupport/src/malloc_statistics_helpers.c, libcsupport/src/malloc_walk.c, libcsupport/src/realloc.c, libmisc/shell/main_perioduse.c: New files.
  • Property mode set to 100644
File size: 10.9 KB
Line 
1/*
2 *  RTEMS Shell Command Set Configuration
3 *
4 *  COPYRIGHT (c) 1989-2007.
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 *  $Id$
12 */
13
14#ifndef _RTEMS_SHELL_CONFIG_h
15#define _RTEMS_SHELL_CONFIG_h
16
17#include <rtems/shell.h>
18
19/*
20 *  Externs for all command definition structures
21 */
22extern rtems_shell_cmd_t rtems_shell_HELP_Command;
23extern rtems_shell_cmd_t rtems_shell_ALIAS_Command;
24extern rtems_shell_cmd_t rtems_shell_LOGOFF_Command;
25
26extern rtems_shell_cmd_t rtems_shell_MDUMP_Command;
27extern rtems_shell_cmd_t rtems_shell_WDUMP_Command;
28extern rtems_shell_cmd_t rtems_shell_MEDIT_Command;
29extern rtems_shell_cmd_t rtems_shell_MFILL_Command;
30extern rtems_shell_cmd_t rtems_shell_MMOVE_Command;
31
32extern rtems_shell_cmd_t rtems_shell_DATE_Command;
33extern rtems_shell_cmd_t rtems_shell_ID_Command;
34extern rtems_shell_cmd_t rtems_shell_TTY_Command;
35extern rtems_shell_cmd_t rtems_shell_WHOAMI_Command;
36
37extern rtems_shell_cmd_t rtems_shell_PWD_Command;
38extern rtems_shell_cmd_t rtems_shell_LS_Command;
39extern rtems_shell_cmd_t rtems_shell_CHDIR_Command;
40extern rtems_shell_cmd_t rtems_shell_MKDIR_Command;
41extern rtems_shell_cmd_t rtems_shell_RMDIR_Command;
42extern rtems_shell_cmd_t rtems_shell_CHROOT_Command;
43extern rtems_shell_cmd_t rtems_shell_CHMOD_Command;
44extern rtems_shell_cmd_t rtems_shell_CAT_Command;
45extern rtems_shell_cmd_t rtems_shell_MSDOSFMT_Command;
46extern rtems_shell_cmd_t rtems_shell_RM_Command;
47extern rtems_shell_cmd_t rtems_shell_UMASK_Command;
48extern rtems_shell_cmd_t rtems_shell_MOUNT_Command;
49extern rtems_shell_cmd_t rtems_shell_UNMOUNT_Command;
50extern rtems_shell_cmd_t rtems_shell_BLKSYNC_Command;
51
52extern rtems_shell_cmd_t rtems_shell_CPUUSE_Command;
53extern rtems_shell_cmd_t rtems_shell_STACKUSE_Command;
54extern rtems_shell_cmd_t rtems_shell_PERIODUSE_Command;
55extern rtems_shell_cmd_t rtems_shell_MALLOC_INFO_Command;
56
57extern rtems_shell_cmd_t *rtems_shell_Initial_commands[];
58
59/*
60 *  Extern for alias commands
61 */
62extern rtems_shell_alias_t rtems_shell_DIR_Alias;
63extern rtems_shell_alias_t rtems_shell_CD_Alias;
64extern rtems_shell_alias_t rtems_shell_EXIT_Alias;
65
66extern rtems_shell_alias_t *rtems_shell_Initial_aliases[];
67
68/*
69 *  Extern for alias commands
70 */
71extern rtems_shell_filesystems_t rtems_shell_Mount_MSDOS;
72extern rtems_shell_filesystems_t rtems_shell_Mount_TFTP;
73extern rtems_shell_filesystems_t rtems_shell_Mount_FTP;
74extern rtems_shell_filesystems_t rtems_shell_Mount_NFS;
75
76extern rtems_shell_filesystems_t *rtems_shell_Mount_filesystems[];
77
78/*
79 *  If we are configured to alias a command, then make sure the underlying
80 *  command is configured.
81 */
82
83#if !defined(CONFIGURE_SHELL_COMMANDS_ALL)
84  #if defined(CONFIGURE_SHELL_COMMANDS_DIR) && \
85      !defined(CONFIGURE_SHELL_COMMANDS_LS)
86    #define CONFIGURE_SHELL_COMMAND_LS
87  #endif
88
89  #if defined(CONFIGURE_SHELL_COMMANDS_CD) && \
90      !defined(CONFIGURE_SHELL_COMMANDS_CHDIR)
91    #define CONFIGURE_SHELL_COMMAND_CHDIR
92  #endif
93
94  #if defined(CONFIGURE_SHELL_COMMANDS_EXIT) && \
95      !defined(CONFIGURE_SHELL_COMMANDS_LOGOFF)
96    #define CONFIGURE_SHELL_COMMAND_LOGOFF
97  #endif
98#endif
99
100#if defined(CONFIGURE_SHELL_COMMANDS_INIT)
101  rtems_shell_alias_t *rtems_shell_Initial_aliases[] = {
102    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
103         !defined(CONFIGURE_SHELL_NO_COMMAND_DIR)) || \
104        defined(CONFIGURE_SHELL_COMMAND_DIR)
105      &rtems_shell_DIR_Alias,
106    #endif
107    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
108         !defined(CONFIGURE_SHELL_NO_COMMAND_CD)) || \
109        defined(CONFIGURE_SHELL_COMMAND_CD)
110      &rtems_shell_CD_Alias,
111    #endif
112    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
113         !defined(CONFIGURE_SHELL_NO_COMMAND_EXIT)) || \
114        defined(CONFIGURE_SHELL_COMMAND_EXIT)
115      &rtems_shell_EXIT_Alias,
116    #endif
117
118    /*
119     *  User defined shell aliases
120     */
121    #if defined(CONFIGURE_SHELL_USER_ALIASES)
122      CONFIGURE_SHELL_USER_ALIASES,
123    #endif
124    NULL
125  };
126
127  rtems_shell_cmd_t *rtems_shell_Initial_commands[] = {
128    /*
129     *  General comamnds that should be present
130     */
131    &rtems_shell_HELP_Command,
132    &rtems_shell_ALIAS_Command,
133
134    /*
135     *  Common commands that can be optional
136     */
137    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
138         !defined(CONFIGURE_SHELL_NO_COMMAND_DATE)) || \
139        defined(CONFIGURE_SHELL_COMMAND_DATE)
140      &rtems_shell_DATE_Command,
141    #endif
142    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
143         !defined(CONFIGURE_SHELL_NO_COMMAND_ID)) || \
144        defined(CONFIGURE_SHELL_COMMAND_ID)
145      &rtems_shell_ID_Command,
146    #endif
147    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
148         !defined(CONFIGURE_SHELL_NO_COMMAND_TTY)) || \
149        defined(CONFIGURE_SHELL_COMMAND_TTY)
150      &rtems_shell_TTY_Command,
151    #endif
152    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
153         !defined(CONFIGURE_SHELL_NO_COMMAND_WHOAMI)) || \
154        defined(CONFIGURE_SHELL_COMMAND_WHOAMI)
155      &rtems_shell_WHOAMI_Command,
156    #endif
157    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
158         !defined(CONFIGURE_SHELL_NO_COMMAND_LOGOFF)) || \
159        defined(CONFIGURE_SHELL_COMMAND_LOGOFF)
160      &rtems_shell_LOGOFF_Command,
161    #endif
162
163    /*
164     *  Memory printing/modification family commands
165     */
166    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
167        !defined(CONFIGURE_SHELL_NO_COMMAND_MDUMP)) || \
168        defined(CONFIGURE_SHELL_COMMAND_MDUMP)
169      &rtems_shell_MDUMP_Command,
170    #endif
171    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
172         !defined(CONFIGURE_SHELL_NO_COMMAND_WDUMP)) || \
173        defined(CONFIGURE_SHELL_COMMAND_WDUMP)
174      &rtems_shell_WDUMP_Command,
175    #endif
176    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
177         !defined(CONFIGURE_SHELL_NO_COMMAND_MEDIT)) || \
178        defined(CONFIGURE_SHELL_COMMAND_MEDIT)
179      &rtems_shell_MEDIT_Command,
180    #endif
181    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
182         !defined(CONFIGURE_SHELL_NO_COMMAND_MFILL)) || \
183        defined(CONFIGURE_SHELL_COMMAND_MFILL)
184      &rtems_shell_MFILL_Command,
185    #endif
186    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
187         !defined(CONFIGURE_SHELL_NO_COMMAND_MMOVE)) || \
188        defined(CONFIGURE_SHELL_COMMAND_MMOVE)
189      &rtems_shell_MMOVE_Command,
190    #endif
191
192    /*
193     *  File and directory commands
194     */
195    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
196         !defined(CONFIGURE_SHELL_NO_COMMAND_PWD)) || \
197        defined(CONFIGURE_SHELL_COMMAND_PWD)
198      &rtems_shell_PWD_Command,
199    #endif
200    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
201         !defined(CONFIGURE_SHELL_NO_COMMAND_LS)) || \
202        defined(CONFIGURE_SHELL_COMMAND_LS)
203      &rtems_shell_LS_Command,
204    #endif
205    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
206         !defined(CONFIGURE_SHELL_NO_COMMAND_CHDIR)) || \
207        defined(CONFIGURE_SHELL_COMMAND_CHDIR)
208      &rtems_shell_CHDIR_Command,
209    #endif
210    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
211         !defined(CONFIGURE_SHELL_NO_COMMAND_MKDIR)) || \
212        defined(CONFIGURE_SHELL_COMMAND_MKDIR)
213      &rtems_shell_MKDIR_Command,
214    #endif
215    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
216         !defined(CONFIGURE_SHELL_NO_COMMAND_RMDIR)) || \
217        defined(CONFIGURE_SHELL_COMMAND_RMDIR)
218      &rtems_shell_RMDIR_Command,
219    #endif
220    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
221         !defined(CONFIGURE_SHELL_NO_COMMAND_CHROOT)) || \
222        defined(CONFIGURE_SHELL_COMMAND_CHROOT)
223      &rtems_shell_CHROOT_Command,
224    #endif
225    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
226         !defined(CONFIGURE_SHELL_NO_COMMAND_CHMOD)) || \
227        defined(CONFIGURE_SHELL_COMMAND_CHMOD)
228      &rtems_shell_CHMOD_Command,
229    #endif
230    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
231         !defined(CONFIGURE_SHELL_NO_COMMAND_CAT)) || \
232        defined(CONFIGURE_SHELL_COMMAND_CAT)
233      &rtems_shell_CAT_Command,
234    #endif
235    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
236         !defined(CONFIGURE_SHELL_NO_COMMAND_MSDOSFMT)) || \
237        defined(CONFIGURE_SHELL_COMMAND_MSDOSFMT)
238      &rtems_shell_MSDOSFMT_Command,
239    #endif
240    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
241         !defined(CONFIGURE_SHELL_NO_COMMAND_RM)) || \
242        defined(CONFIGURE_SHELL_COMMAND_RM)
243      &rtems_shell_RM_Command,
244    #endif
245    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
246         !defined(CONFIGURE_SHELL_NO_COMMAND_UMASK)) || \
247        defined(CONFIGURE_SHELL_COMMAND_UMASK)
248      &rtems_shell_UMASK_Command,
249    #endif
250    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
251         !defined(CONFIGURE_SHELL_NO_COMMAND_MOUNT)) || \
252        defined(CONFIGURE_SHELL_COMMAND_MOUNT)
253      &rtems_shell_MOUNT_Command,
254    #endif
255    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
256         !defined(CONFIGURE_SHELL_NO_COMMAND_UNMOUNT)) || \
257        defined(CONFIGURE_SHELL_COMMAND_UNMOUNT)
258      &rtems_shell_UNMOUNT_Command,
259    #endif
260    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
261         !defined(CONFIGURE_SHELL_NO_COMMAND_BLKSYNC)) || \
262        defined(CONFIGURE_SHELL_COMMAND_BLKSYNC)
263      &rtems_shell_BLKSYNC_Command,
264    #endif
265
266    /*
267     *  RTEMS Related commands
268     */
269    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
270         !defined(CONFIGURE_SHELL_NO_COMMAND_CPUUSE)) || \
271        defined(CONFIGURE_SHELL_COMMAND_CPUUSE)
272      &rtems_shell_CPUUSE_Command,
273    #endif
274    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
275         !defined(CONFIGURE_SHELL_NO_COMMAND_STACKUSE)) || \
276        defined(CONFIGURE_SHELL_COMMAND_STACKUSE)
277      &rtems_shell_STACKUSE_Command,
278    #endif
279    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
280         !defined(CONFIGURE_SHELL_NO_COMMAND_PERIODUSE)) || \
281        defined(CONFIGURE_SHELL_COMMAND_PERIODUSE)
282      &rtems_shell_PERIODUSE_Command,
283    #endif
284
285    /*
286     *  Malloc family commands
287     */
288    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
289         !defined(CONFIGURE_SHELL_COMMAND_MALLOC_INFO)) || \
290        defined(CONFIGURE_SHELL_COMMAND_MALLOC_INFO)
291      &rtems_shell_MALLOC_INFO_Command,
292    #endif
293
294    /*
295     *  User defined shell commands
296     */
297    #if defined(CONFIGURE_SHELL_USER_COMMANDS)
298      CONFIGURE_SHELL_USER_COMMANDS,
299    #endif
300    NULL
301  };
302
303  /*
304   * The mount command's support file system types.
305   */
306  #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
307       !defined(CONFIGURE_SHELL_COMMAND_MOUNT)) || \
308       defined(CONFIGURE_SHELL_COMMAND_UNMOUNT)
309    rtems_shell_filesystems_t *rtems_shell_Mount_filesystems[] = {
310      #if defined(CONFIGURE_SHELL_MOUNT_MSDOS)
311        &rtems_shell_Mount_MSDOS,
312      #endif
313      #if RTEMS_NETWORKING
314        #if defined(CONFIGURE_SHELL_MOUNT_TFTP)
315          &rtems_shell_Mount_TFTP,
316        #endif
317        #if defined(CONFIGURE_SHELL_MOUNT_FTP)
318          &rtems_shell_Mount_FTP,
319        #endif
320        #if defined(CONFIGURE_SHELL_MOUNT_NFS)
321          &rtems_shell_Mount_NFS,
322        #endif
323      #endif
324      NULL
325    };
326  #endif
327
328#endif
329
330#endif
Note: See TracBrowser for help on using the repository browser.