Ignore:
Timestamp:
2010-01-29T17:15:32Z (14 years ago)
Author:
Pavel Rimsky <pavel@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b86d436
Parents:
86018c1
Message:

Cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/drivers/niagara.c

    r86018c1 r8e33e1d  
    5252#include <genarch/srln/srln.h>
    5353
     54/* polling interval in miliseconds */
    5455#define POLL_INTERVAL  10000
    5556
     57/* device instance */
    5658static niagara_instance_t *instance = NULL;
    5759
     
    124126static void niagara_poll(niagara_instance_t *instance)
    125127{
     128        /* print any pending characters from the shared buffer to the console */
    126129        while (output_buffer.read_ptr != output_buffer.write_ptr) {
    127130                do_putchar(output_buffer.data[output_buffer.read_ptr]);
     
    132135        uint64_t c;
    133136
     137        /* read character from keyboard, send it to upper layers of HelenOS */
    134138        if (__hypercall_fast_ret1(0, 0, 0, 0, 0, CONS_GETCHAR, &c) == EOK) {
    135139                if (!silent) {
     140                        /* kconsole active, send the character to kernel */
    136141                        indev_push_character(instance->srlnin, c);
    137142                } else {
     143                        /* kconsole inactive, send the character to uspace driver */
    138144                        input_buffer.data[input_buffer.write_ptr] = (char) c;
    139145                        input_buffer.write_ptr =
     
    141147                }
    142148        }
    143 
    144149}
    145150
     
    177182
    178183        instance->srlnin = NULL;
    179         sysinfo_set_item_val("fb.kind", NULL, 5);
     184
     185        output_buffer.read_ptr = 0;
     186        output_buffer.write_ptr = 0;
     187        input_buffer.write_ptr = 0;
     188        input_buffer.read_ptr = 0;
    180189
    181190        /*
     
    184193         * buffers.
    185194         */
    186         output_buffer.read_ptr = 0;
    187         output_buffer.write_ptr = 0;
    188         input_buffer.write_ptr = 0;
    189         input_buffer.read_ptr = 0;
     195
     196        sysinfo_set_item_val("fb.kind", NULL, 5);
    190197
    191198        sysinfo_set_item_val("niagara.outbuf.address", NULL,
Note: See TracChangeset for help on using the changeset viewer.