Subversion Repositories HelenOS

Rev

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

Rev 3817 Rev 3863
Line 58... Line 58...
58
 
58
 
59
/** defined in drivers/kbd.c */
59
/** defined in drivers/kbd.c */
60
extern kbd_type_t kbd_type;
60
extern kbd_type_t kbd_type;
61
 
61
 
62
/** Writes a single character to the standard output. */
62
/** Writes a single character to the standard output. */
-
 
63
static inline void do_putchar(const char c) {
-
 
64
    /* repeat until the buffer is non-full */
-
 
65
    while (__hypercall_fast1(CONS_PUTCHAR, c) == EWOULDBLOCK)
-
 
66
        ;
-
 
67
}
-
 
68
 
-
 
69
/** Writes a single character to the standard output. */
63
static void niagara_putchar(struct chardev * cd, const char c)
70
static void niagara_putchar(struct chardev * cd, const char c)
64
{
71
{
65
    __hypercall_fast1(CONS_PUTCHAR, c);
72
    do_putchar(c);
66
    if (c == '\n')
73
    if (c == '\n')
67
        __hypercall_fast1(CONS_PUTCHAR, '\r');
74
        do_putchar('\r');
68
}
75
}
69
 
76
 
70
/**
77
/**
71
 * Grabs the input for kernel.
78
 * Grabs the input for kernel.
72
 */
79
 */