Subversion Repositories HelenOS

Rev

Rev 4326 | Rev 4352 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4326 Rev 4329
Line 62... Line 62...
62
/** Index of currently used virtual console.
62
/** Index of currently used virtual console.
63
 */
63
 */
64
int active_console = 0;
64
int active_console = 0;
65
int prev_console = 0;
65
int prev_console = 0;
66
 
66
 
-
 
67
/** Phone to the keyboard driver. */
-
 
68
static int kbd_phone;
-
 
69
 
67
/** Information about framebuffer */
70
/** Information about framebuffer */
68
struct {
71
struct {
69
    int phone;      /**< Framebuffer phone */
72
    int phone;      /**< Framebuffer phone */
70
    ipcarg_t rows;      /**< Framebuffer rows */
73
    ipcarg_t rows;      /**< Framebuffer rows */
71
    ipcarg_t cols;      /**< Framebuffer columns */
74
    ipcarg_t cols;      /**< Framebuffer columns */
Line 149... Line 152...
149
static void screen_reclaim(void)
152
static void screen_reclaim(void)
150
{
153
{
151
    ipc_call_sync_0_0(fb_info.phone, FB_SCREEN_RECLAIM);
154
    ipc_call_sync_0_0(fb_info.phone, FB_SCREEN_RECLAIM);
152
}
155
}
153
 
156
 
-
 
157
static void kbd_yield(void)
-
 
158
{
-
 
159
    ipc_call_sync_0_0(kbd_phone, KBD_YIELD);
-
 
160
}
-
 
161
 
-
 
162
static void kbd_reclaim(void)
-
 
163
{
-
 
164
    ipc_call_sync_0_0(kbd_phone, KBD_RECLAIM);
-
 
165
}
-
 
166
 
154
static void set_style(int style)
167
static void set_style(int style)
155
{
168
{
156
    async_msg_1(fb_info.phone, FB_SET_STYLE, style);
169
    async_msg_1(fb_info.phone, FB_SET_STYLE, style);
157
}
170
}
158
 
171
 
Line 339... Line 352...
339
    if (newcons == KERNEL_CONSOLE) {
352
    if (newcons == KERNEL_CONSOLE) {
340
        async_serialize_start();
353
        async_serialize_start();
341
        curs_hide_sync();
354
        curs_hide_sync();
342
        gcons_in_kernel();
355
        gcons_in_kernel();
343
        screen_yield();
356
        screen_yield();
-
 
357
        kbd_yield();
344
        async_serialize_end();
358
        async_serialize_end();
345
 
359
 
346
       
360
       
347
        if (__SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE)) {
361
        if (__SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE)) {
348
            prev_console = active_console;
362
            prev_console = active_console;
Line 354... Line 368...
354
    if (newcons != KERNEL_CONSOLE) {
368
    if (newcons != KERNEL_CONSOLE) {
355
        async_serialize_start();
369
        async_serialize_start();
356
       
370
       
357
        if (active_console == KERNEL_CONSOLE) {
371
        if (active_console == KERNEL_CONSOLE) {
358
            screen_reclaim();
372
            screen_reclaim();
-
 
373
            kbd_reclaim();
359
            gcons_redraw_console();
374
            gcons_redraw_console();
360
        }
375
        }
361
       
376
       
362
        active_console = newcons;
377
        active_console = newcons;
363
        gcons_change_console(newcons);
378
        gcons_change_console(newcons);
Line 663... Line 678...
663
int main(int argc, char *argv[])
678
int main(int argc, char *argv[])
664
{
679
{
665
    printf(NAME ": HelenOS Console service\n");
680
    printf(NAME ": HelenOS Console service\n");
666
   
681
   
667
    ipcarg_t phonehash;
682
    ipcarg_t phonehash;
668
    int kbd_phone;
-
 
669
    size_t ib_size;
683
    size_t ib_size;
670
    int i;
684
    int i;
671
   
685
   
672
    async_set_client_connection(client_connection);
686
    async_set_client_connection(client_connection);
673
   
687