Changeset 516ff92 in mainline for kernel/arch/ia64/src/ski/ski.c


Ignore:
Timestamp:
2009-01-31T21:27:18Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4863e50b
Parents:
96a2e45
Message:

silent kernel console output when user space console is active

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/src/ski/ski.c

    r96a2e45 r516ff92  
    5757static bool kbd_disabled;
    5858
    59 static void ski_putchar(chardev_t *d, const char ch);
    60 static int32_t ski_getchar(void);
    61 
    6259/** Display character on debug console
    6360 *
     
    6865 * @param ch Character to be printed.
    6966 */
    70 void ski_putchar(chardev_t *d, const char ch)
    71 {
    72         asm volatile (
    73                 "mov r15 = %0\n"
    74                 "mov r32 = %1\n"        /* r32 is in0 */
    75                 "break 0x80000\n"       /* modifies r8 */
    76                 :
    77                 : "i" (SKI_PUTCHAR), "r" (ch)
    78                 : "r15", "in0", "r8"
    79         );
    80        
    81         if (ch == '\n')
    82                 ski_putchar(d, '\r');
     67static void ski_putchar(chardev_t *d, const char ch, bool silent)
     68{
     69        if (!silent) {
     70                asm volatile (
     71                        "mov r15 = %0\n"
     72                        "mov r32 = %1\n"   /* r32 is in0 */
     73                        "break 0x80000\n"  /* modifies r8 */
     74                        :
     75                        : "i" (SKI_PUTCHAR), "r" (ch)
     76                        : "r15", "in0", "r8"
     77                );
     78               
     79                if (ch == '\n')
     80                        ski_putchar(d, '\r');
     81        }
    8382}
    8483
     
    9291 * @return ASCII code of pressed key or 0 if no key pressed.
    9392 */
    94 int32_t ski_getchar(void)
     93static int32_t ski_getchar(void)
    9594{
    9695        uint64_t ch;
Note: See TracChangeset for help on using the changeset viewer.