lkml.org 
[lkml]   [2003]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 4/8] OProfile update
    From
    Date

    If there's are multiple tasks sleeping inside the read routine ever, this is necessary.

    diff -Naur -X dontdiff linux-cvs/drivers/oprofile/event_buffer.c linux-me/drivers/oprofile/event_buffer.c
    --- linux-cvs/drivers/oprofile/event_buffer.c 2002-12-21 19:18:20.000000000 +0000
    +++ linux-me/drivers/oprofile/event_buffer.c 2003-04-29 01:09:35.000000000 +0100
    @@ -151,11 +151,15 @@
    if (count != max || *offset)
    return -EINVAL;

    - /* wait for the event buffer to fill up with some data */
    wait_event_interruptible(buffer_wait, atomic_read(&buffer_ready));
    +
    if (signal_pending(current))
    return -EINTR;

    + /* can't currently happen */
    + if (!atomic_read(&buffer_ready))
    + return -EAGAIN;
    +
    down(&buffer_sem);

    atomic_set(&buffer_ready, 0);
    -
    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 13:35    [W:3.163 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site