[lkml]   [2005]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 1/19] MUTEX: Introduce simple mutex implementation
    David Howells wrote:
    > Alan Cox <> wrote:

    >>It seems to me it would be far far saner to define something like
    >> sleep_lock(&foo)
    >> sleep_unlock(&foo)
    >> sleep_trylock(&foo)
    > Which would be a _lot_ more work. It would involve about ten times as many
    > changes, I think, and thus be more prone to errors.

    "lots of work" has never been a valid reason for not doing a kernel

    In this case, introducing a new API means the changes can be made over time.

    As time goes on you can convert more and more code to the mutex/sleep
    lock and any tricky code just stays with the older API until someone who
    understands it can vet it.

    As Alan mentioned, the standard counting semaphore API is up/down.
    Making those refer to a sleeping mutex violates the principle of least


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-12-13 15:39    [W:0.021 / U:6.448 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site