Date: Mon, 05 May 2014 09:28:15 -0600 From: Ian Lepore <ian@FreeBSD.org> To: Adrian Chadd <adrian@FreeBSD.org> Cc: "freebsd-arm@freebsd.org" <freebsd-arm@FreeBSD.org> Subject: Re: USB isochronous traffic with Rasberry Pi [WAS: Re: USB audio device on Raspberry Pi] Message-ID: <1399303695.22079.239.camel@revolution.hippie.lan> In-Reply-To: <CAJ-Vmo=XmH-RX6_i13NuAXhq-jTC%2BWedGiyOMJaPO4r014DSgw@mail.gmail.com> References: <20140425154430.GA76168@utility-01.thismonkey.com> <535A8AEA.1000100@selasky.org> <20140425204134.GA458@cicely7.cicely.de> <20140430091411.GA45015@utility-01.thismonkey.com> <5360C0A7.9010407@selasky.org> <1398867266.22079.51.camel@revolution.hippie.lan> <CAGW5k5bZ_bTQUXuzNm=tbwx3npz1_HoOR3vM8TBRVFs8zWCq-w@mail.gmail.com> <5362638B.1080104@selasky.org> <5363C133.2000304@selasky.org> <53677CB8.5000800@selasky.org> <CAJ-Vmo=XmH-RX6_i13NuAXhq-jTC%2BWedGiyOMJaPO4r014DSgw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2014-05-05 at 08:18 -0700, Adrian Chadd wrote: > evil idea: > > #define DELAY(ms) _DELAY(ms, __FILE__, __LINE__) > > .. then modify the relevant arm delay function to take FILE/LINE and > KTR log it. :-) > > > -a Except some uart console output routines are structured like while (!readreg(STATUS) & TXRDY) DELAY(n); I don't know why people think that calling delay in busy loops like that has any value, considering that DELAY is almost always implemented as some form of while (readreg(COUNTER) < target_count) ; I guess maybe it has value only in that it helps you find busy-loops. I'd rather that we had a function just for that purpose, like while (readreg(COUNTER) < target_count) cpu_busy_loop(); (We have something like that that's x86-specific, iirc). -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1399303695.22079.239.camel>