Subversion Repositories HelenOS

Rev

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

Rev 4348 Rev 4389
Line 501... Line 501...
501
    size_t off;
501
    size_t off;
502
 
502
 
503
    if (!ipc_data_write_receive(&callid, &size)) {
503
    if (!ipc_data_write_receive(&callid, &size)) {
504
        ipc_answer_0(callid, EINVAL);
504
        ipc_answer_0(callid, EINVAL);
505
        ipc_answer_0(rid, EINVAL);
505
        ipc_answer_0(rid, EINVAL);
-
 
506
        return;
506
    }
507
    }
507
 
508
 
508
    if (size > CWRITE_BUF_SIZE)
509
    if (size > CWRITE_BUF_SIZE)
509
        size = CWRITE_BUF_SIZE;
510
        size = CWRITE_BUF_SIZE;
510
 
511
 
511
    (void) ipc_data_write_finalize(callid, cwrite_buf, size);
512
    (void) ipc_data_write_finalize(callid, cwrite_buf, size);
512
 
513
 
-
 
514
    async_serialize_start();
-
 
515
 
513
    off = 0;
516
    off = 0;
514
    while (off < size) {
517
    while (off < size) {
515
        ch = str_decode(cwrite_buf, &off, size);
518
        ch = str_decode(cwrite_buf, &off, size);
516
        write_char(consnum, ch);
519
        write_char(consnum, ch);
517
    }
520
    }
518
 
521
 
-
 
522
    async_serialize_end();
-
 
523
 
519
    gcons_notify_char(consnum);
524
    gcons_notify_char(consnum);
520
    ipc_answer_1(rid, EOK, size);
525
    ipc_answer_1(rid, EOK, size);
521
}
526
}
522
 
527
 
523
/** Default thread for new connections */
528
/** Default thread for new connections */
Line 573... Line 578...
573
        case CONSOLE_PUTCHAR:
578
        case CONSOLE_PUTCHAR:
574
            write_char(consnum, IPC_GET_ARG1(call));
579
            write_char(consnum, IPC_GET_ARG1(call));
575
            gcons_notify_char(consnum);
580
            gcons_notify_char(consnum);
576
            break;
581
            break;
577
        case CONSOLE_WRITE:
582
        case CONSOLE_WRITE:
-
 
583
            async_serialize_end();
578
            cons_write(consnum, callid, &call);
584
            cons_write(consnum, callid, &call);
-
 
585
            async_serialize_start();
579
            continue;
586
            continue;
580
        case CONSOLE_CLEAR:
587
        case CONSOLE_CLEAR:
581
            /* Send message to fb */
588
            /* Send message to fb */
582
            if (consnum == active_console) {
589
            if (consnum == active_console) {
583
                async_msg_0(fb_info.phone, FB_CLEAR);
590
                async_msg_0(fb_info.phone, FB_CLEAR);