Changeset c92e30f in mainline


Ignore:
Timestamp:
2012-08-14T20:06:27Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a987832
Parents:
4c73361
Message:

ns8250: No need to yield every time we read from the serial device

Location:
uspace/drv/char/ns8250
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/ns8250/cyclic_buffer.h

    r4c73361 rc92e30f  
    3636#define CYCLIC_BUFFER_H_
    3737
    38 #define BUF_LEN 256
     38#define BUF_LEN 4096
    3939
    4040typedef struct cyclic_buffer {
  • uspace/drv/char/ns8250/ns8250.c

    r4c73361 rc92e30f  
    745745        bool cont = true;
    746746       
     747        fibril_mutex_lock(&ns->mutex);
    747748        while (cont) {
    748                 fibril_mutex_lock(&ns->mutex);
    749                
    750749                cont = ns8250_received(regs);
    751750                if (cont) {
     
    757756                                        ddf_msg(LVL_WARN, "Buffer overflow on "
    758757                                            "%s.", ns->dev->name);
     758                                        break;
    759759                                } else {
    760760                                        ddf_msg(LVL_DEBUG2, "Character %c saved "
     
    766766                        }
    767767                }
    768                
    769                 fibril_mutex_unlock(&ns->mutex);
    770                 fibril_yield();
    771         }
     768        }
     769        fibril_mutex_unlock(&ns->mutex);
     770        fibril_yield();
    772771}
    773772
Note: See TracChangeset for help on using the changeset viewer.