Re: [PATCH 1/1] Replace down_trylock() with down_try(), reverse return values.



On Mon, May 05, 2008 at 01:56:35AM +0000, Rusty Russell wrote:

down_trylock() returns 1 on failure, 0 on success. This differs from
spin_trylock(), mutex_trylock() and common sense. Or as ocfs2 put it
"kernel 1, world 0".

Rename it to down_try() (which makes more sense anyway), and reverse
it. Fortunately there aren't a huge number of callers left.

I took the liberty of reversing the sense of usb_trylock_device()
without renaming it: it's only used in one place anyway.

Given that people are actively trying to kill struct semaphore I don't
think doing a big search and rename is a good idea right now.

(And I also really hate the name down_try, but when it goes away that's
rather void and we can spare the discussion)

--
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/



Relevant Pages

  • Re: [PATCH 1/1] Replace down_trylock() with down_try(), reverse return values.
    ... spin_trylock, mutex_trylockand common sense. ... Or as ocfs2 put it ... "kernel 1, world 0". ... Rename it to down_try, ...
    (Linux-Kernel)
  • Re: rewriterule + image name
    ... rename the generic one and still display the same image under ... It think you mean the reverse? ... ..htaccess ErrorDocument as a php file that generates the missing image ...
    (comp.lang.php)
  • Re: If Im going to be "Flamed": it may as well beTHIS group.
    ... don't know if this will assist but it's easy to reverse if it doesn't ... and then click Rename. ... Start Outlook Express. ... > Tonight I decided to open OE6, empty the Inbox AND Deleted Items. ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: I cant recieve emails in my outlook express all of a sudden
    ... You could try this if you want, you can always reverse the procedure if not ... and then click Rename. ... > recieved, but they won't load. ... > mircrosoft problem or server problem....Any help would be ...
    (microsoft.public.windowsupdate)
  • Re: Renaming Stored Prcedures via EM
    ... Use sp_rename in Query Analyzer; it doesn't get confused the way EM does. ... (Reverse address to reply.) ... "Guadala Harry" wrote in message ... > on the sp name and then selecting Rename from the pop up menu. ...
    (microsoft.public.sqlserver.programming)

Loading