[patch] 2.3.6 alpha fixes

Jeff Garzik (jgarzik@pobox.com)
Sat, 12 Jun 1999 10:55:42 -0400


This is a multi-part message in MIME format.
--------------868EE18F76269990DE9CACFF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

2.3.6 doesn't compile, at least in non-SMP configuration. The attached
patch fixes the error (shown below) by converting some spinlock macros
into inline funcs.

Along the lines of the comment at the top of
include/asm-alpha/spinlock.h, would a patch to move that stuff into
inline funcs in include/linux/spinlock.h be accepted?

Jeff

gcc -D__KERNEL__ -I/usr/local/home/jgarzik/cvs/linux_2_3/include -Wall
-Wstrict-prototypes -O2 -pipe -mno-fp-regs -ffixed-8 -mcpu=ev4 -c -o
dst.o dst.c
dst.c: In function `dst_run_gc':
dst.c:49: wrong type argument to unary exclamation mark
dst.c: At top level:
dst.c:34: warning: `dst_lock' defined but not used
make[3]: *** [dst.o] Error 1
make[3]: Leaving directory
`/usr/local/home/jgarzik/cvs/linux_2_3/net/core'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory
`/usr/local/home/jgarzik/cvs/linux_2_3/net/core'
make[1]: *** [_subdir_core] Error 2
make[1]: Leaving directory `/usr/local/home/jgarzik/cvs/linux_2_3/net'
make: *** [_dir_net] Error 2
--------------868EE18F76269990DE9CACFF
Content-Type: text/plain; charset=us-ascii;
name="patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch"

Index: include/asm-alpha/spinlock.h
===================================================================
RCS file: /usr/local/cvsroot/linux_2_3/include/asm-alpha/spinlock.h,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 spinlock.h
--- include/asm-alpha/spinlock.h 1999/06/11 00:39:10 1.1.1.4
+++ include/asm-alpha/spinlock.h 1999/06/12 14:18:34
@@ -47,11 +47,11 @@
#define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
#endif

-#define spin_lock_init(lock) ((void) 0)
-#define spin_lock(lock) ((void) 0)
-#define spin_trylock(lock) ((void) 0)
-#define spin_unlock_wait(lock) ((void) 0)
-#define spin_unlock(lock) ((void) 0)
+extern inline void spin_lock_init(spinlock_t *) { /* do nothing */ }
+extern inline void spin_lock(spinlock_t *) { /* do nothing */ }
+extern inline int spin_trylock(spinlock_t *) { return 0; }
+extern inline void spin_unlock_wait(spinlock_t *) { /* do nothing */ }
+extern inline void spin_unlock(spinlock_t *) { /* do nothing */ }

/*
* Read-write spinlocks, allowing multiple readers

--------------868EE18F76269990DE9CACFF--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/