VirtualBox

Changes between Version 1 and Version 2 of Ticket #18668, comment 15


Ignore:
Timestamp:
Dec 6, 2021 10:09:01 AM (2 years ago)
Author:
FelixG

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18668, comment 15

    v1 v2  
    3232            if (rc == VINF_SUCCESS)
    3333            {
    34                 *puVal = pThis->uRegRbr;
    35 
    3634                /* Reset the Break bit. */
    3735                UART_REG_CLR(pThis->uRegLsr, UART_REG_LSR_BI);
     
    4442                if (ASMAtomicReadU32(&pThis->cbAvailRdr) > 0)
    4543                {
     44                    *puVal = pThis->uRegRbr;
    4645                    Assert(pThis->cbAvailRdr);
    4746                    uint32_t cbAvail = ASMAtomicDecU32(&pThis->cbAvailRdr);
     
    5857                    }
    5958                }
     59                else
     60                {
     61                    /*
     62                     * This voids a rare situation where the RBR record is read
     63                     * and new data arrives at the same time.
     64                     */
     65                    *puVal = pThis->uRegRbr;
     66                }
    6067            }
    6168        }

© 2023 Oracle
ContactPrivacy policyTerms of Use