Messages in this thread | | | Subject | Re: [PATCH 2/13] use cpu_relax() in busy loop | From | Arjan van de Ven <> | Date | Fri, 19 Sep 2003 09:33:50 +0200 |
| |
On Fri, 2003-09-19 at 01:27, Chris Wright wrote: > [PATCH 2/13] use cpu_relax() in busy loop > > Replace busy loop nop with cpu_relax(). > > ===== drivers/atm/fore200e.c 1.19 vs edited ===== > --- 1.19/drivers/atm/fore200e.c Tue Sep 2 11:07:59 2003 > +++ edited/drivers/atm/fore200e.c Thu Sep 18 10:42:17 2003 > @@ -248,7 +248,8 @@ > fore200e_spin(int msecs) > { > unsigned long timeout = jiffies + MSECS(msecs); > - while (time_before(jiffies, timeout)); > + while (time_before(jiffies, timeout)) > + cpu_relax(); > }
ehmmm how about making this use mdelay instead ? (not to speak of maybe making it sleep, but that's a less obvious transformation) [unhandled content-type:application/pgp-signature] | |