Re: [PATCH] isapnp driver semaphore to mutex

From: Daniel Walker
Date: Mon Dec 03 2007 - 14:32:10 EST


On Mon, 2007-12-03 at 20:11 +0100, Michal Schmidt wrote:
> Dne Mon, 03 Dec 2007 10:35:01 -0800
> Daniel Walker <dwalker@xxxxxxxxxx> napsal(a):
>
> > Speaking of automating.. I created a little .vimrc add-on which helps
> > doing sem2mutex type changes. Here's the chunk I added,
> >
> > function Semtomutex( lo )
> > exe '%s/down(&'.a:lo.')/mutex_lock\(\&'.a:lo.'\)/g'
> > exe '%s/down_trylock(&'.a:lo.')/mutex_trylock\(\&'.a:lo.'\)/g'
>
> From the comment above mutex_trylock():
> * NOTE: this function follows the spin_trylock() convention, so
> * it is negated to the down_trylock() return values! Be careful
> * about this when converting semaphore users to mutexes.
>
> Michal

Thanks, I didn't notice this .. I've only run into one tho..

Daniel

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/