Re: generic rwsem [Re: Alpha "process table hang"]

From: Christoph Hellwig (hch@caldera.de)
Date: Tue Apr 17 2001 - 16:29:23 EST


Hi Andrea,

In article <20010417224933.E31982@athlon.random> you wrote:
> I didn't exported rwsem.c if CONFIG_RWSEM_GENERIC is set to n as suggested
> by Christoph yet because the old code couldn't be buggy and it's not obvious to
> me that the other way around is correct (Christoph are you sure we can export an
> object file that is not even compiled/generated? If answer is yes the export
> mechanism must be smart enough to discard that file if not present but I'm not
> sure if that's the case ;)

Yes! All the objects in export-objs only get additional depencies in
Rules.make - but if they do not get compiled at all that depencies won't
matter either. All other makefile work this way, btw.

In my first mail I forgot that the makefile can be optimized even
further, the hunk should look like this:
(NOTE: the patch is handwritten, no apply gurantee)

diff -urN 2.4.4pre3/lib/Makefile rwsem/lib/Makefile
--- 2.4.4pre3/lib/Makefile Sat Apr 14 15:21:29 2001
+++ rwsem/lib/Makefile Tue Apr 17 21:58:57 2001
@@ -10,10 +10,12 @@

 export-objs := cmdline.o rwsem.o

-obj-y := errno.o ctype.o string.o vsprintf.o brlock.o cmdline.o rwsem.o
+obj-y := errno.o ctype.o string.o vsprintf.o brlock.o cmdline.o

 ifneq ($(CONFIG_HAVE_DEC_LOCK),y)
   obj-y += dec_and_lock.o
 endif

+obj-$(CONFIG_GENERIC_RWSEM) += rwsem.o
+
 include $(TOPDIR)/Rules.make

        Christoph

-- 
Of course it doesn't work. We've performed a software upgrade.
-
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/



This archive was generated by hypermail 2b29 : Mon Apr 23 2001 - 21:00:24 EST