Changeset c624b96 in mainline


Ignore:
Timestamp:
2006-04-14T15:11:32Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
280a27e
Parents:
8b473ce
Message:

Coding style changes for the last commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • genarch/src/i8042/i8042.c

    r8b473ce rc624b96  
    272272void i8042_init(void)
    273273{
     274        int i;
     275
    274276        exc_register(VECTOR_KBD, "i8042_interrupt", (iroutine) i8042_interrupt);
    275277        i8042_wait();
     
    282284        chardev_initialize("i8042_kbd", &kbrd, &ops);
    283285        stdin = &kbrd;
     286
    284287        /*
    285         * Clear input buffer
    286         */
    287         {
    288                 int a=0;
    289                 while((i8042_status_read()&i8042_BUFFER_FULL_MASK)&&(a<20)) {
     288         * Clear input buffer.
     289         * Number of iterations is limited to prevent infinite looping.
     290         */
     291        for (i = 0; (i8042_status_read() & i8042_BUFFER_FULL_MASK) && i < 100; i++) {
    290292                i8042_data_read();
    291                 a++;
    292                 } 
    293         }
     293        } 
    294294}
    295295
Note: See TracChangeset for help on using the changeset viewer.