mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: Alan Cox <alan@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: linux-2.4.9: atomic_dec_and_lock sometimes used while not defined
Date: 17 Aug 2001 12:15:56 +0200	[thread overview]
Message-ID: <shsu1z7c7qa.fsf@charged.uio.no> (raw)
In-Reply-To: <200108161821.LAA02805@adam.yggdrasil.com> <shs8zgjdovh.fsf@charged.uio.no>
In-Reply-To: Trond Myklebust's message of "17 Aug 2001 11:20:18 +0200"


>>>>> " " == 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

  reply	other threads:[~2001-08-17 10:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-16 18:21 Adam J. Richter
2001-08-17  9:20 ` Trond Myklebust
2001-08-17 10:15   ` Trond Myklebust [this message]
2001-08-17 10:31     ` Christoph Hellwig
2001-08-17 10:40     ` Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=shsu1z7c7qa.fsf@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=adam@yggdrasil.com \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®