lkml.org 
[lkml]   [2004]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subjectwait_on_bit_lock() must test_and_set_bit(), not test_bit()
    On Tue, Aug 31, 2004 at 01:09:16AM -0700, William Lee Irwin III wrote:
    >> I very distinctly recall compiling and booting these...

    On Tue, Aug 31, 2004 at 01:14:56AM -0700, William Lee Irwin III wrote:
    > Index: mm2-2.6.9-rc1/kernel/wait.c

    Incremental atop the fastcall fix:

    wait_on_bit_lock() needs to test_and_set_bit() in the fastpath, not
    test_bit().


    -- wli

    Index: mm2-2.6.9-rc1/include/linux/wait.h
    ===================================================================
    --- mm2-2.6.9-rc1.orig/include/linux/wait.h 2004-08-31 01:37:55.507900064 -0700
    +++ mm2-2.6.9-rc1/include/linux/wait.h 2004-08-31 01:38:34.670946376 -0700
    @@ -388,7 +388,7 @@
    DEFINE_WAIT_BIT(q, word, bit);
    wait_queue_head_t *wqh;

    - if (!test_bit(bit, word))
    + if (!test_and_set_bit(bit, word))
    return 0;

    wqh = bit_waitqueue(word, bit);
    -
    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: 2005-03-22 14:05    [W:3.757 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site