lkml.org 
[lkml]   [2001]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject2.4.10 build failure - atomic_dec_and_lock export
Date
From
Trond,

2.4.10 won't link with CONFIG_SMP and i386 CPU selected. I believe the problem
lies in in the #ifndef atomic_dec_and_lock in lib/dec_and_lock.c. As far as I
can see this symbol is always defined because it's exported.

The following patch works for me, but I barely understand the kernel build
machinery(*) so please don't use this without checking it carefully.

Ian

* e.g. I cannot understand why this symbol isn't versioned in the object file.

--- linux/lib/dec_and_lock.c.orig Tue Oct 2 15:47:44 2001
+++ linux/lib/dec_and_lock.c Tue Oct 2 16:07:01 2001
@@ -1,3 +1,4 @@
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <asm/atomic.h>
@@ -26,7 +27,8 @@
* store-conditional approach, for example.
*/

-#ifndef atomic_dec_and_lock
+#ifdef CONFIG_SMP
+#ifndef CONFIG_HAVE_DEC_LOCK
int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock)
{
spin_lock(lock);
@@ -37,4 +39,5 @@
}

EXPORT_SYMBOL(atomic_dec_and_lock);
+#endif
#endif
--
Ian Grant, Computer Lab., William Gates Building, JJ Thomson Ave., Cambridge
Phone: +44 1223 334420


-
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 13:03    [W:2.007 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site