patch-2.1.51 linux/include/asm-sparc64/uaccess.h

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

diff -u --recursive --new-file v2.1.50/linux/include/asm-sparc64/uaccess.h linux/include/asm-sparc64/uaccess.h
@@ -1,4 +1,4 @@
-/* $Id: uaccess.h,v 1.20 1997/07/13 18:23:45 davem Exp $ */
+/* $Id: uaccess.h,v 1.21 1997/07/31 07:37:25 davem Exp $ */
 #ifndef _ASM_UACCESS_H
 #define _ASM_UACCESS_H
 
@@ -30,8 +30,11 @@
 
 #define get_fs() (current->tss.current_ds)
 #define get_ds() (KERNEL_DS)
+
+extern spinlock_t scheduler_lock;
+
 #define set_fs(val)				\
-do {						\
+do {	spin_lock(&scheduler_lock);		\
 	current->tss.current_ds = (val);	\
 	if ((val) == KERNEL_DS) {		\
 		flushw_user ();			\
@@ -41,6 +44,7 @@
 	}					\
 	spitfire_set_secondary_context(current->tss.ctx); \
 	__asm__ __volatile__("flush %g6");	\
+	spin_unlock(&scheduler_lock);		\
 } while(0)
 
 #define __user_ok(addr,size) 1

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov