patch-2.4.17 linux/include/asm-sparc64/smplock.h

Next file: linux/include/asm-sparc64/spinlock.h
Previous file: linux/include/asm-sparc64/smp.h
Back to the patch index
Back to the overall index

diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.16/include/asm-sparc64/smplock.h linux/include/asm-sparc64/smplock.h
@@ -9,7 +9,9 @@
 
 extern spinlock_t kernel_flag;
 
-#define kernel_locked()		spin_is_locked(&kernel_flag)
+#define kernel_locked()			\
+	(spin_is_locked(&kernel_flag) &&\
+	 (current->lock_depth >= 0))
 
 /*
  * Release global kernel lock and global interrupt lock

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)