direct-io.hg

changeset 5465:7a449c0b860f

bitkeeper revision 1.1713.1.12 (42b0da31QIvTtfE2iHo4yER4A1GFIw)

serial.c:
Fix serial_getc locking.
author kaf24@firebug.cl.cam.ac.uk
date Thu Jun 16 01:47:29 2005 +0000 (2005-06-16)
parents a1112c70ee4a
children 88198072cbef 38763dfb2287
files xen/drivers/char/serial.c
line diff
     1.1 --- a/xen/drivers/char/serial.c	Wed Jun 15 14:41:49 2005 +0000
     1.2 +++ b/xen/drivers/char/serial.c	Thu Jun 16 01:47:29 2005 +0000
     1.3 @@ -176,11 +176,15 @@ char serial_getc(int handle)
     1.4              if ( port->rxbufp != port->rxbufc )
     1.5              {
     1.6                  c = port->rxbuf[MASK_SERIAL_RXBUF_IDX(port->rxbufc++)];
     1.7 +                spin_unlock_irqrestore(&port->lock, flags);
     1.8                  break;
     1.9              }
    1.10              
    1.11              if ( port->driver->getc(port, &c) )
    1.12 +            {
    1.13 +                spin_unlock_irqrestore(&port->lock, flags);
    1.14                  break;
    1.15 +            }
    1.16  
    1.17              spin_unlock_irqrestore(&port->lock, flags);
    1.18