All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-2.4.9: atomic_dec_and_lock sometimes used while not defined
@ 2001-08-16 18:21 Adam J. Richter
  2001-08-17  9:20 ` Trond Myklebust
  0 siblings, 1 reply; 5+ messages in thread
From: Adam J. Richter @ 2001-08-16 18:21 UTC (permalink / raw)
  To: linux-kernel

	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().  I imagine that the correct fix is to
change the ifdefs that bracket the following line in include/linux/spinlock.h:

#define atomic_dec_and_lock(atomic,lock) atomic_dec_and_test(atomic)

	However, I'm really not clear enough on the semantics of
atomic_dec_and_lock vs. atomic_dec_and_test to know whether this
is safe.

	Also, it looks like arch/sparc64/sparc64_ksyms.c references
atomic_dec_and_test without it every being defined on any architecture
other than x86, so I am suspicious of a partially applied patch here.

	If nobody has a better idea, I'm going to move the
#define statement that I mentioned above out of its current
ifdef logic and just bracket it like so:

#ifndef CONFIG_HAVE_DEC_LOCK
#define atomic_dec_and_lock(atomic,lock) atomic_dec_and_test(atomic)
#endif

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-08-17 10:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-16 18:21 linux-2.4.9: atomic_dec_and_lock sometimes used while not defined Adam J. Richter
2001-08-17  9:20 ` Trond Myklebust
2001-08-17 10:15   ` Trond Myklebust
2001-08-17 10:31     ` Christoph Hellwig
2001-08-17 10:40       ` Trond Myklebust

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.