Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1468 → Rev 1474

/kernel/trunk/generic/include/console/console.h
40,4 → 40,7
extern count_t gets(chardev_t *chardev, char *buf, size_t buflen);
extern void putchar(char c);
 
extern void arch_grab_console(void);
extern void arch_release_console(void);
 
#endif /* __CHARDEV_H__ */
/kernel/trunk/generic/include/syscall/syscall.h
58,6 → 58,7
SYS_PREEMPT_CONTROL,
SYS_SYSINFO_VALID,
SYS_SYSINFO_VALUE,
SYS_DEBUG_ENABLE_CONSOLE,
SYSCALL_END
} syscall_t;
 
/kernel/trunk/generic/src/console/cmd.c
37,6 → 37,7
*/
 
#include <console/cmd.h>
#include <console/console.h>
#include <console/kconsole.h>
#include <print.h>
#include <panic.h>
73,6 → 74,14
.argc = 0
};
 
static int cmd_continue(cmd_arg_t *argv);
static cmd_info_t continue_info = {
.name = "continue",
.description ="Return console back to userspace",
.func = cmd_continue,
.argc = 0
};
 
/** Data and methods for 'description' command. */
static int cmd_desc(cmd_arg_t *argv);
static void desc_help(void);
332,6 → 341,7
&call1_info,
&call2_info,
&call3_info,
&continue_info,
&cpus_info,
&desc_info,
&exit_info,
699,3 → 709,15
version_print();
return 1;
}
 
/** Command for returning console back to userspace.
*
* @param argv Ignored.
*
* return Always 1.
*/
int cmd_continue(cmd_arg_t *argv)
{
arch_release_console();
return 1;
}
/kernel/trunk/generic/src/syscall/syscall.c
46,6 → 46,7
#include <security/cap.h>
#include <syscall/copy.h>
#include <sysinfo/sysinfo.h>
#include <console/console.h>
 
/** Print using kernel facility
*
78,6 → 79,13
return count;
}
 
/** Tell kernel to get keyboard/console access again */
static __native sys_debug_enable_console(void)
{
arch_grab_console();
return 0;
}
 
/** Dispatch system call */
__native syscall_handler(__native a1, __native a2, __native a3,
__native a4, __native id)
130,5 → 138,8
/* Sysinfo syscalls */
sys_sysinfo_valid,
sys_sysinfo_value
sys_sysinfo_value,
/* Debug calls */
sys_debug_enable_console
};