Changeset c992538a in mainline


Ignore:
Timestamp:
2010-06-08T20:12:00Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2d3ddad
Parents:
bdfd3cdd
Message:

Disable interrupts during callN kconsole commands.

File:
1 edited

Legend:

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

    rbdfd3cdd rc992538a  
    658658                printf("Duplicate symbol, be more specific.\n");
    659659        } else if (rc == EOK) {
     660                ipl_t ipl;
     661
     662                ipl = interrupts_disable();
    660663                fnc = (unative_t (*)(void)) arch_construct_function(&fptr,
    661664                    (void *) symaddr, (void *) cmd_call0);
    662665                printf("Calling %s() (%p)\n", symbol, symaddr);
    663666                printf("Result: %#" PRIxn "\n", fnc());
     667                interrupts_restore(ipl);
    664668        } else {
    665669                printf("No symbol information available.\n");
     
    719723                printf("Duplicate symbol, be more specific.\n");
    720724        } else if (rc == EOK) {
     725                ipl_t ipl;
     726
     727                ipl = interrupts_disable();
    721728                fnc = (unative_t (*)(unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call1);
    722729                printf("Calling f(%#" PRIxn "): %p: %s\n", arg1, symaddr, symbol);
    723730                printf("Result: %#" PRIxn "\n", fnc(arg1));
     731                interrupts_restore(ipl);
    724732        } else {
    725733                printf("No symbol information available.\n");
     
    749757                printf("Duplicate symbol, be more specific.\n");
    750758        } else if (rc == EOK) {
     759                ipl_t ipl;
     760
     761                ipl = interrupts_disable();
    751762                fnc = (unative_t (*)(unative_t, unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call2);
    752763                printf("Calling f(%#" PRIxn ", %#" PRIxn "): %p: %s\n",
    753764                       arg1, arg2, symaddr, symbol);
    754765                printf("Result: %#" PRIxn "\n", fnc(arg1, arg2));
     766                interrupts_restore(ipl);
    755767        } else {
    756768                printf("No symbol information available.\n");
     
    780792                printf("Duplicate symbol, be more specific.\n");
    781793        } else if (rc == EOK) {
     794                ipl_t ipl;
     795
     796                ipl = interrupts_disable();
    782797                fnc = (unative_t (*)(unative_t, unative_t, unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call3);
    783798                printf("Calling f(%#" PRIxn ",%#" PRIxn ", %#" PRIxn "): %p: %s\n",
    784799                       arg1, arg2, arg3, symaddr, symbol);
    785800                printf("Result: %#" PRIxn "\n", fnc(arg1, arg2, arg3));
     801                interrupts_restore(ipl);
    786802        } else {
    787803                printf("No symbol information available.\n");
Note: See TracChangeset for help on using the changeset viewer.