source: rtems/cpukit/libmisc/shell/main_wkspaceinfo.c @ 6b4e448

4.115
Last change on this file since 6b4e448 was 993a888, checked in by Sebastian Huber <sebastian.huber@…>, on 07/18/13 at 13:05:37

rtems: Create message queue implementation header

Move implementation specific parts of message.h and message.inl into new
header file messageimpl.h. The message.h contains now only the
application visible API.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  MALLOC_INFO Shell Command Implmentation
3 *
4 *  COPYRIGHT (c) 1989-2008.
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#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
13#ifdef HAVE_CONFIG_H
14#include "config.h"
15#endif
16
17#include <inttypes.h>
18
19#include <rtems.h>
20#include <rtems/malloc.h>
21#include <rtems/shell.h>
22#include <rtems/score/protectedheap.h>
23#include <rtems/score/wkspace.h>
24#include "internal.h"
25
26void rtems_shell_print_unified_work_area_message(void)
27{
28  printf( "\nC Program Heap and RTEMS Workspace are %s.\n",
29    rtems_configuration_get_unified_work_area() ? "the same" : "separate"
30  );
31}
32
33static int rtems_shell_main_wkspace_info(
34  int   argc __attribute__((unused)),
35  char *argv[] __attribute__((unused))
36)
37{
38  Heap_Information_block info;
39
40  rtems_shell_print_unified_work_area_message();
41
42  _Protected_heap_Get_information( &_Workspace_Area, &info );
43  rtems_shell_print_heap_info( "free", &info.Free );
44  rtems_shell_print_heap_info( "used", &info.Used );
45
46  return 0;
47}
48
49rtems_shell_cmd_t rtems_shell_WKSPACE_INFO_Command = {
50  "wkspace",                                  /* name */
51  "Report on RTEMS Executive Workspace",      /* usage */
52  "rtems",                                    /* topic */
53  rtems_shell_main_wkspace_info,              /* command */
54  NULL,                                       /* alias */
55  NULL                                        /* next */
56};
Note: See TracBrowser for help on using the repository browser.