lkml.org 
[lkml]   [2004]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8
    From
    Date
    On Fri, 2004-10-22 at 00:42, Timothy Miller wrote:
    > Bill Huey (hui) wrote:
    > > You use a semaphore to protect data, a completion isn't protecting data
    > > but preserving a certain kind of wait ordering in the code. The
    > > possibility of overloading the current mutex_t for PI makes for a conceptual
    > > mismatch when used in this case since having a kind of priority for
    > > completions is a bit odd. It's better to flat out use a completion
    > > instead, IMO.
    > >
    >
    >
    > Could you please define "completion" for me in this context?

    A triggers B to exit and must wait until B has exited. It waits for
    completion of exit.

    A triggers B to execute a command and must wait until B has done so. It
    waits for completion of the command.

    Mutexes are used for that, but that's not the intended functionality of
    a mutex. Of course it works as long as you do no owner checks on the
    mutexes.

    A {
    init_MUTEX_LOCKED(m)
    trigger B
    down(m) <----- recursion, because A owns it already
    }

    The completion is designed for that and should be used IMHO. Mutexe were
    used for that, because the ancestors of completion, sleep_on...(), are
    racy.

    tglx


    -
    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:07    [W:3.863 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site