lkml.org 
[lkml]   [2005]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 1/19] MUTEX: Introduce simple mutex implementation
    Date
    Paul Jackson <pj@sgi.com> wrote:

    > The sed/perl script to make the textual change should be practical.
    > Indeed, I would claim that the initial big patch -should- be done
    > that way. Keep refining a sed script until manual inspection and
    > trial builds of all arch's, allconfig, show that it seems to be right.
    > Each time you find an error doing this, don't manually edit the
    > kernel source; rather refine the script and try applying it again.

    Actually, you may have a point.

    If the order of patches is:

    (1) Create new mutex as struct mutex/up_mutex/down_mutex, say.

    (2) Make counting semaphore implementation struct semaphore/up_sem/down_sem.

    (3) Convert uses of semaphores that should be completions into completions.

    (4) Convert uses of semaphores that should be counting semaphores to use
    up_sem/down_sem.

    (5) Mass convert by script all the remaining ups and downs into up_mutex and
    down_mutex.

    (6) Make wrappers for up/down that map to counting semaphores with the
    deprecation attribute set.

    That might work, and would be a lot easier; except for the humongous patch
    generated at step 5 - which could be regenerated by script. I think I can make
    a simple perl script to do that.

    Note that I am assuming above that down == down/down_trylock/down_interruptible
    for clarity.

    David
    -
    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-12-14 12:05    [W:0.024 / U:2.192 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site