lkml.org 
[lkml]   [2007]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] isapnp driver semaphore to mutex
Dne Mon, 03 Dec 2007 10:35:01 -0800
Daniel Walker <dwalker@mvista.com> 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


\
 
 \ /
  Last update: 2007-12-03 20:21    [W:0.033 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site