lkml.org 
[lkml]   [2001]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: linux-2.4.9: atomic_dec_and_lock sometimes used while not defined
From
Date

>>>>> " " == Adam J Richter <adam@yggdrasil.com> writes:
>> If I try to build a kernel that can do SMP and run on a 386,
>> the linux-2.4.9 NFS client gets compiled with an undefined
>> reference to atomic_dec_and_lock().

Bummer I found the bug. It's not a missing define, but a missing
export...

Cheers,
Trond

diff -u --recursive --new-file linux-2.4.9.orig/lib/Makefile linux-2.4.9/lib/Makefile
--- linux-2.4.9.orig/lib/Makefile Wed Apr 25 22:31:03 2001
+++ linux-2.4.9/lib/Makefile Fri Aug 17 11:52:35 2001
@@ -16,6 +16,7 @@
obj-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o

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

diff -u --recursive --new-file linux-2.4.9.orig/lib/dec_and_lock.c linux-2.4.9/lib/dec_and_lock.c
--- linux-2.4.9.orig/lib/dec_and_lock.c Sat Jul 8 01:22:48 2000
+++ linux-2.4.9/lib/dec_and_lock.c Fri Aug 17 11:55:02 2001
@@ -1,3 +1,4 @@
+#include <linux/module.h>
#include <linux/spinlock.h>
#include <asm/atomic.h>

@@ -34,4 +35,6 @@
spin_unlock(lock);
return 0;
}
+
+EXPORT_SYMBOL(atomic_dec_and_lock);
#endif
-
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 12:57    [W:0.111 / U:0.556 seconds]
©2003-2014 Jasper Spaans. Advertise on this site