Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4420 → Rev 4419

/branches/dd/uspace/srv/console/console.c
64,9 → 64,6
int active_console = 0;
int prev_console = 0;
 
/** Phone to the keyboard driver. */
static int kbd_phone;
 
/** Information about framebuffer */
struct {
int phone; /**< Framebuffer phone */
144,26 → 141,6
async_msg_2(fb_info.phone, FB_CURSOR_GOTO, row, col);
}
 
static void screen_yield(void)
{
ipc_call_sync_0_0(fb_info.phone, FB_SCREEN_YIELD);
}
 
static void screen_reclaim(void)
{
ipc_call_sync_0_0(fb_info.phone, FB_SCREEN_RECLAIM);
}
 
static void kbd_yield(void)
{
ipc_call_sync_0_0(kbd_phone, KBD_YIELD);
}
 
static void kbd_reclaim(void)
{
ipc_call_sync_0_0(kbd_phone, KBD_RECLAIM);
}
 
static void set_style(int style)
{
async_msg_1(fb_info.phone, FB_SET_STYLE, style);
353,10 → 330,7
async_serialize_start();
curs_hide_sync();
gcons_in_kernel();
screen_yield();
kbd_yield();
async_serialize_end();
 
if (__SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE)) {
prev_console = active_console;
368,11 → 342,8
if (newcons != KERNEL_CONSOLE) {
async_serialize_start();
if (active_console == KERNEL_CONSOLE) {
screen_reclaim();
kbd_reclaim();
if (active_console == KERNEL_CONSOLE)
gcons_redraw_console();
}
active_console = newcons;
gcons_change_console(newcons);
503,7 → 474,6
if (!ipc_data_write_receive(&callid, &size)) {
ipc_answer_0(callid, EINVAL);
ipc_answer_0(rid, EINVAL);
return;
}
 
if (size > CWRITE_BUF_SIZE)
511,8 → 481,6
 
(void) ipc_data_write_finalize(callid, cwrite_buf, size);
 
async_serialize_start();
 
off = 0;
while (off < size) {
ch = str_decode(cwrite_buf, &off, size);
519,8 → 487,6
write_char(consnum, ch);
}
 
async_serialize_end();
 
gcons_notify_char(consnum);
ipc_answer_1(rid, EOK, size);
}
546,8 → 512,6
gcons_notify_connect(consnum);
conn->client_phone = IPC_GET_ARG5(*icall);
screenbuffer_clear(&conn->screenbuffer);
if (consnum == active_console)
clrscr();
/* Accept the connection */
ipc_answer_0(iid, EOK);
580,9 → 544,7
gcons_notify_char(consnum);
break;
case CONSOLE_WRITE:
async_serialize_end();
cons_write(consnum, callid, &call);
async_serialize_start();
continue;
case CONSOLE_CLEAR:
/* Send message to fb */
687,6 → 649,7
printf(NAME ": HelenOS Console service\n");
ipcarg_t phonehash;
int kbd_phone;
size_t ib_size;
int i;