Changeset 41d33ac in mainline for generic


Ignore:
Timestamp:
2006-05-31T22:18:40Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e7ed9868
Parents:
018f95a
Message:

Added syscall that lets kernel regain access to keyboard.

Location:
generic
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • generic/include/console/console.h

    r018f95a r41d33ac  
    4141extern void putchar(char c);
    4242
     43extern void arch_grab_console(void);
     44extern void arch_release_console(void);
     45
    4346#endif /* __CHARDEV_H__ */
  • generic/include/syscall/syscall.h

    r018f95a r41d33ac  
    5959        SYS_SYSINFO_VALID,
    6060        SYS_SYSINFO_VALUE,
     61        SYS_DEBUG_ENABLE_CONSOLE,
    6162        SYSCALL_END
    6263} syscall_t;
  • generic/src/console/cmd.c

    r018f95a r41d33ac  
    3838
    3939#include <console/cmd.h>
     40#include <console/console.h>
    4041#include <console/kconsole.h>
    4142#include <print.h>
     
    7172        .name = "exit",
    7273        .description ="Exit kconsole",
     74        .argc = 0
     75};
     76
     77static int cmd_continue(cmd_arg_t *argv);
     78static cmd_info_t continue_info = {
     79        .name = "continue",
     80        .description ="Return console back to userspace",
     81        .func = cmd_continue,
    7382        .argc = 0
    7483};
     
    333342        &call2_info,
    334343        &call3_info,
     344        &continue_info,
    335345        &cpus_info,
    336346        &desc_info,
     
    700710        return 1;
    701711}
     712
     713/** Command for returning console back to userspace.
     714 *
     715 * @param argv Ignored.
     716 *
     717 * return Always 1.
     718 */
     719int cmd_continue(cmd_arg_t *argv)
     720{
     721        arch_release_console();
     722        return 1;
     723}
  • generic/src/syscall/syscall.c

    r018f95a r41d33ac  
    4747#include <syscall/copy.h>
    4848#include <sysinfo/sysinfo.h>
     49#include <console/console.h>
    4950
    5051/** Print using kernel facility
     
    7778       
    7879        return count;
     80}
     81
     82/** Tell kernel to get keyboard/console access again */
     83static __native sys_debug_enable_console(void)
     84{
     85        arch_grab_console();
     86        return 0;
    7987}
    8088
     
    131139        /* Sysinfo syscalls */
    132140        sys_sysinfo_valid,
    133         sys_sysinfo_value
     141        sys_sysinfo_value,
     142       
     143        /* Debug calls */
     144        sys_debug_enable_console
    134145};
Note: See TracChangeset for help on using the changeset viewer.