[lkml]   [2005]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/19] MUTEX: Introduce simple mutex implementation
Paul Jackson <> 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

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

(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.

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-14 12:05    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean