Date: Thu, 20 Apr 2006 21:03:51 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95715 for review Message-ID: <200604202103.k3KL3p5R093090@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95715 Change 95715 by imp@imp_hammer on 2006/04/20 21:03:37 Make getc(0) effect a poll. This also happens to save 4 bytes. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/getc.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/getc.c#3 (text) ==== @@ -53,10 +53,10 @@ thisSecond = GetSeconds(); seconds = thisSecond + seconds; - while (thisSecond <= seconds) { + do { if ((pUSART->US_CSR & AT91C_US_RXRDY)) return (pUSART->US_RHR & 0xFF); thisSecond = GetSeconds(); - } + } while (thisSecond < seconds); return (-1); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604202103.k3KL3p5R093090>