![]() | |||||||||||||
Messages in this thread |
On 3/6/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Tue, 06 Mar 2007 14:54:18 +0800 "Wu, Bryan" <bryan.wu@analog.com> wrote:
>
> > Hi folks,
> >
> > [PATCH] Blackfin: blackfin i2c driver
> >
> > + struct i2c_msg *pmsg;
> > + int i, ret;
> > + int rc = 0;
> > +
> > + if (!(bfin_read_TWI_CONTROL() & TWI_ENA))
> > + return -ENXIO;
> > +
> > + down(&iface->twi_lock);
> > +
> > + while (bfin_read_TWI_MASTER_STAT() & BUSBUSY) {
> > + up(&iface->twi_lock);
> > + schedule();
> > + down(&iface->twi_lock);
> > + }
>
> That's a busy loop until this task's timeslice has expired. It'll work,
> but it'll suck a bit. (Repeated in several places)
>
OK, I change it into yield(). So, current process will be move to the
tail of the run queue. Is that OK with you?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
| ||||||||||||
| Last update: 2007-03-07 06:21 [from the cache] ©2003-2008 | |||||||||||||