Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero

From: Nick Piggin (nickpiggin_at_yahoo.com.au)
Date: 09/15/05

  • Next message: Andrea Arcangeli: "Re: git tag in localversion"
    Date:	Thu, 15 Sep 2005 11:51:24 +1000
    To: Russell King <rmk+lkml@arm.linux.org.uk>
    
    

    Russell King wrote:

    > The whole point about architecture specific includes is not to provide
    > a frenzied feeding ground for folk who like to "clean code up" but to
    > allow architectures to do things in the most efficient way for them
    > without polluting the kernel too much.
    >
    > It seems that aspect is being lost sight of here.
    >

    Yep. We've got atomic_add, atomic_sub, atomic_inc, atomic_dec,
    atomic_inc_return, atomic_add_return, atomic_dec_return, atomic_sub_return
    to start with.

    Not only that, but we can probably emulate all the atomic_ operations
    with atomic_cmpxchg, not just atomic_inc_not_zero.

    Roman: any ideas about what you would prefer? You'll notice
    atomic_inc_not_zero replaces rcuref_inc_lf, which is used several times
    in the VFS.

    Thanks,
    Nick

    -- 
    SUSE Labs, Novell Inc.
    Send instant messages to your online friends http://au.messenger.yahoo.com 
    -
    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/
    

  • Next message: Andrea Arcangeli: "Re: git tag in localversion"

    Relevant Pages

    • Re: making kmalloc BUG() might not be a good idea
      ... >-ENOMEM kinds of failures will now BUG() the kernel. ... Send instant messages to your online friends http://au.messenger.yahoo.com ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Automatic Configuration of a Kernel
      ... Unlike majority of users I suppose, I upgrade the kernel often ... Something that can do the hardware detection, then maps that to drivers would ... Send instant messages to your online friends http://au.messenger.yahoo.com - ... 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/ ...
      (Linux-Kernel)
    • Re: Why no XML in the Kernel?
      ... > The information is passed fairly rarely, but over time extra parameters ... > kernel and the userspace app have to both keep in step. ... Send instant messages to your online friends http://au.messenger.yahoo.com ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Very strange Marvell/Yukon Gigabit NIC networking problems
      ... kernel 2.6.13 ethernet driver has done something wrong ... Today I did upgrade the kernel to 2.6.13 and it still ... Send instant messages to your online friends http://au.messenger.yahoo.com ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH 1/3] 2.6.8-rc4-mm1 - Fix UML build
      ... can access them all, and initialized data all before uninitialized, so ... SYMLINKS:= $,$/$f) ... semaphore.c-dir = kernel ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)