Messages in this thread Patch in this message | | | Date | Sat, 12 Jun 1999 10:55:42 -0400 | From | Jeff Garzik <> | Subject | [patch] 2.3.6 alpha fixes |
| |
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 2Index: 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
| |