Changeset 4e147a6 in mainline for generic/src/console/cmd.c


Ignore:
Timestamp:
2006-02-02T01:51:25Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9ea8a7ca
Parents:
b5e0bb8
Message:

Skeleton of SLAB allocator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/console/cmd.c

    rb5e0bb8 r4e147a6  
    5151#include <mm/frame.h>
    5252#include <main/version.h>
     53#include <mm/slab.h>
    5354
    5455/** Data and methods for 'help' command. */
     
    244245
    245246
     247static int cmd_slabs(cmd_arg_t *argv);
     248static cmd_info_t slabs_info = {
     249        .name = "slabs",
     250        .description = "List SLAB caches.",
     251        .func = cmd_slabs,
     252        .argc = 0
     253};
     254
    246255/** Data and methods for 'zones' command */
    247256static int cmd_zones(cmd_arg_t *argv);
     
    353362        if (!cmd_register(&zones_info))
    354363                panic("could not register command %s\n", zones_info.name);
     364
     365        cmd_initialize(&slabs_info);
     366        if (!cmd_register(&slabs_info))
     367                panic("could not register command %s\n", slabs_info.name);
    355368
    356369        cmd_initialize(&zone_info);
     
    604617}
    605618
     619/** Command for listings SLAB caches
     620 *
     621 * @param argv Ignores
     622 *
     623 * @return Always 1
     624 */
     625int cmd_slabs(cmd_arg_t * argv) {
     626        slab_print_list();
     627        return 1;
     628}
     629
    606630/** Command for listing memory zones
    607631 *
Note: See TracChangeset for help on using the changeset viewer.