From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:03:52 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9EF1916A405; Thu, 20 Apr 2006 21:03:52 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D50116A403 for ; Thu, 20 Apr 2006 21:03:52 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03B5143D48 for ; Thu, 20 Apr 2006 21:03:52 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KL3phY093093 for ; Thu, 20 Apr 2006 21:03:51 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KL3p5R093090 for perforce@freebsd.org; Thu, 20 Apr 2006 21:03:51 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 21:03:51 GMT Message-Id: <200604202103.k3KL3p5R093090@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95715 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:03:52 -0000 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); }