patch-2.3.51 linux/arch/ia64/kernel/semaphore.c
Next file: linux/arch/ia64/kernel/setup.c
Previous file: linux/arch/ia64/kernel/process.c
Back to the patch index
Back to the overall index
-  Lines: 21
-  Date:
Fri Mar 10 15:24:02 2000
-  Orig file: 
v2.3.50/linux/arch/ia64/kernel/semaphore.c
-  Orig date: 
Thu Feb 10 17:11:03 2000
diff -u --recursive --new-file v2.3.50/linux/arch/ia64/kernel/semaphore.c linux/arch/ia64/kernel/semaphore.c
@@ -138,9 +138,10 @@
 int
 __down_trylock (struct semaphore *sem)
 {
+	unsigned long flags;
 	int sleepers;
 
-	spin_lock_irq(&semaphore_lock);
+	spin_lock_irqsave(&semaphore_lock, flags);
 	sleepers = sem->sleepers + 1;
 	sem->sleepers = 0;
 
@@ -151,7 +152,7 @@
 	if (!atomic_add_negative(sleepers, &sem->count))
 		wake_up(&sem->wait);
 
-	spin_unlock_irq(&semaphore_lock);
+	spin_unlock_irqrestore(&semaphore_lock, flags);
 	return 1;
 }
 
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)